MediaWiki  1.23.2
backup_PageTest.php
Go to the documentation of this file.
1 <?php
10 
11  // We'll add several pages, revision and texts. The following variables hold the
12  // corresponding ids.
21 
22  function addDBData() {
23  // be sure, titles created here using english namespace names
24  $this->setMwGlobals( array(
25  'wgLanguageCode' => 'en',
26  'wgContLang' => Language::factory( 'en' ),
27  ) );
28 
29  $this->tablesUsed[] = 'page';
30  $this->tablesUsed[] = 'revision';
31  $this->tablesUsed[] = 'text';
32 
33  try {
34  $this->namespace = $this->getDefaultWikitextNS();
35  $this->talk_namespace = NS_TALK;
36 
37  if ( $this->namespace === $this->talk_namespace ) {
38  // @todo work around this.
39  throw new MWException( "The default wikitext namespace is the talk namespace. "
40  . " We can't currently deal with that." );
41  }
42 
43  $this->pageTitle1 = Title::newFromText( 'BackupDumperTestP1', $this->namespace );
44  $page = WikiPage::factory( $this->pageTitle1 );
45  list( $this->revId1_1, $this->textId1_1 ) = $this->addRevision( $page,
46  "BackupDumperTestP1Text1", "BackupDumperTestP1Summary1" );
47  $this->pageId1 = $page->getId();
48 
49  $this->pageTitle2 = Title::newFromText( 'BackupDumperTestP2', $this->namespace );
50  $page = WikiPage::factory( $this->pageTitle2 );
51  list( $this->revId2_1, $this->textId2_1 ) = $this->addRevision( $page,
52  "BackupDumperTestP2Text1", "BackupDumperTestP2Summary1" );
53  list( $this->revId2_2, $this->textId2_2 ) = $this->addRevision( $page,
54  "BackupDumperTestP2Text2", "BackupDumperTestP2Summary2" );
55  list( $this->revId2_3, $this->textId2_3 ) = $this->addRevision( $page,
56  "BackupDumperTestP2Text3", "BackupDumperTestP2Summary3" );
57  list( $this->revId2_4, $this->textId2_4 ) = $this->addRevision( $page,
58  "BackupDumperTestP2Text4 some additional Text ",
59  "BackupDumperTestP2Summary4 extra " );
60  $this->pageId2 = $page->getId();
61 
62  $this->pageTitle3 = Title::newFromText( 'BackupDumperTestP3', $this->namespace );
63  $page = WikiPage::factory( $this->pageTitle3 );
64  list( $this->revId3_1, $this->textId3_1 ) = $this->addRevision( $page,
65  "BackupDumperTestP3Text1", "BackupDumperTestP2Summary1" );
66  list( $this->revId3_2, $this->textId3_2 ) = $this->addRevision( $page,
67  "BackupDumperTestP3Text2", "BackupDumperTestP2Summary2" );
68  $this->pageId3 = $page->getId();
69  $page->doDeleteArticle( "Testing ;)" );
70 
71  $this->pageTitle4 = Title::newFromText( 'BackupDumperTestP1', $this->talk_namespace );
72  $page = WikiPage::factory( $this->pageTitle4 );
73  list( $this->revId4_1, $this->textId4_1 ) = $this->addRevision( $page,
74  "Talk about BackupDumperTestP1 Text1",
75  "Talk BackupDumperTestP1 Summary1" );
76  $this->pageId4 = $page->getId();
77  } catch ( Exception $e ) {
78  // We'd love to pass $e directly. However, ... see
79  // documentation of exceptionFromAddDBData in
80  // DumpTestCase
81  $this->exceptionFromAddDBData = $e;
82  }
83  }
84 
85  protected function setUp() {
86  parent::setUp();
87 
88  // Since we will restrict dumping by page ranges (to allow
89  // working tests, even if the db gets prepopulated by a base
90  // class), we have to assert, that the page id are consecutively
91  // increasing
92  $this->assertEquals(
93  array( $this->pageId2, $this->pageId3, $this->pageId4 ),
94  array( $this->pageId1 + 1, $this->pageId2 + 1, $this->pageId3 + 1 ),
95  "Page ids increasing without holes" );
96  }
97 
98  function testFullTextPlain() {
99  // Preparing the dump
100  $fname = $this->getNewTempFile();
101  $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
102  $dumper->startId = $this->pageId1;
103  $dumper->endId = $this->pageId4 + 1;
104  $dumper->reporting = false;
105  $dumper->setDb( $this->db );
106 
107  // Performing the dump
109 
110  // Checking the dumped data
111  $this->assertDumpStart( $fname );
112 
113  // Page 1
114  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
115  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
116  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87",
117  "BackupDumperTestP1Text1" );
118  $this->assertPageEnd();
119 
120  // Page 2
121  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
122  $this->assertRevision( $this->revId2_1, "BackupDumperTestP2Summary1",
123  $this->textId2_1, 23, "jprywrymfhysqllua29tj3sc7z39dl2",
124  "BackupDumperTestP2Text1" );
125  $this->assertRevision( $this->revId2_2, "BackupDumperTestP2Summary2",
126  $this->textId2_2, 23, "b7vj5ks32po5m1z1t1br4o7scdwwy95",
127  "BackupDumperTestP2Text2", $this->revId2_1 );
128  $this->assertRevision( $this->revId2_3, "BackupDumperTestP2Summary3",
129  $this->textId2_3, 23, "jfunqmh1ssfb8rs43r19w98k28gg56r",
130  "BackupDumperTestP2Text3", $this->revId2_2 );
131  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
132  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv",
133  "BackupDumperTestP2Text4 some additional Text", $this->revId2_3 );
134  $this->assertPageEnd();
135 
136  // Page 3
137  // -> Page is marked deleted. Hence not visible
138 
139  // Page 4
140  $this->assertPageStart( $this->pageId4, $this->talk_namespace, $this->pageTitle4->getPrefixedText() );
141  $this->assertRevision( $this->revId4_1, "Talk BackupDumperTestP1 Summary1",
142  $this->textId4_1, 35, "nktofwzd0tl192k3zfepmlzxoax1lpe",
143  "Talk about BackupDumperTestP1 Text1" );
144  $this->assertPageEnd();
145 
146  $this->assertDumpEnd();
147  }
148 
149  function testFullStubPlain() {
150  // Preparing the dump
151  $fname = $this->getNewTempFile();
152  $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
153  $dumper->startId = $this->pageId1;
154  $dumper->endId = $this->pageId4 + 1;
155  $dumper->reporting = false;
156  $dumper->setDb( $this->db );
157 
158  // Performing the dump
160 
161  // Checking the dumped data
162  $this->assertDumpStart( $fname );
163 
164  // Page 1
165  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
166  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
167  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87" );
168  $this->assertPageEnd();
169 
170  // Page 2
171  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
172  $this->assertRevision( $this->revId2_1, "BackupDumperTestP2Summary1",
173  $this->textId2_1, 23, "jprywrymfhysqllua29tj3sc7z39dl2" );
174  $this->assertRevision( $this->revId2_2, "BackupDumperTestP2Summary2",
175  $this->textId2_2, 23, "b7vj5ks32po5m1z1t1br4o7scdwwy95", false, $this->revId2_1 );
176  $this->assertRevision( $this->revId2_3, "BackupDumperTestP2Summary3",
177  $this->textId2_3, 23, "jfunqmh1ssfb8rs43r19w98k28gg56r", false, $this->revId2_2 );
178  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
179  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv", false, $this->revId2_3 );
180  $this->assertPageEnd();
181 
182  // Page 3
183  // -> Page is marked deleted. Hence not visible
184 
185  // Page 4
186  $this->assertPageStart( $this->pageId4, $this->talk_namespace, $this->pageTitle4->getPrefixedText() );
187  $this->assertRevision( $this->revId4_1, "Talk BackupDumperTestP1 Summary1",
188  $this->textId4_1, 35, "nktofwzd0tl192k3zfepmlzxoax1lpe" );
189  $this->assertPageEnd();
190 
191  $this->assertDumpEnd();
192  }
193 
194  function testCurrentStubPlain() {
195  // Preparing the dump
196  $fname = $this->getNewTempFile();
197  $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
198  $dumper->startId = $this->pageId1;
199  $dumper->endId = $this->pageId4 + 1;
200  $dumper->reporting = false;
201  $dumper->setDb( $this->db );
202 
203  // Performing the dump
205 
206  // Checking the dumped data
207  $this->assertDumpStart( $fname );
208 
209  // Page 1
210  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
211  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
212  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87" );
213  $this->assertPageEnd();
214 
215  // Page 2
216  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
217  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
218  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv", false, $this->revId2_3 );
219  $this->assertPageEnd();
220 
221  // Page 3
222  // -> Page is marked deleted. Hence not visible
223 
224  // Page 4
225  $this->assertPageStart( $this->pageId4, $this->talk_namespace, $this->pageTitle4->getPrefixedText() );
226  $this->assertRevision( $this->revId4_1, "Talk BackupDumperTestP1 Summary1",
227  $this->textId4_1, 35, "nktofwzd0tl192k3zfepmlzxoax1lpe" );
228  $this->assertPageEnd();
229 
230  $this->assertDumpEnd();
231  }
232 
233  function testCurrentStubGzip() {
234  $this->checkHasGzip();
235 
236  // Preparing the dump
237  $fname = $this->getNewTempFile();
238  $dumper = new BackupDumper( array( "--output=gzip:" . $fname ) );
239  $dumper->startId = $this->pageId1;
240  $dumper->endId = $this->pageId4 + 1;
241  $dumper->reporting = false;
242  $dumper->setDb( $this->db );
243 
244  // Performing the dump
246 
247  // Checking the dumped data
248  $this->gunzip( $fname );
249  $this->assertDumpStart( $fname );
250 
251  // Page 1
252  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
253  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
254  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87" );
255  $this->assertPageEnd();
256 
257  // Page 2
258  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
259  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
260  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv", false, $this->revId2_3 );
261  $this->assertPageEnd();
262 
263  // Page 3
264  // -> Page is marked deleted. Hence not visible
265 
266  // Page 4
267  $this->assertPageStart( $this->pageId4, $this->talk_namespace, $this->pageTitle4->getPrefixedText() );
268  $this->assertRevision( $this->revId4_1, "Talk BackupDumperTestP1 Summary1",
269  $this->textId4_1, 35, "nktofwzd0tl192k3zfepmlzxoax1lpe" );
270  $this->assertPageEnd();
271 
272  $this->assertDumpEnd();
273  }
274 
276  // xmldumps-backup typically performs a single dump that that writes
277  // out three files
278  // * gzipped stubs of everything (meta-history)
279  // * gzipped stubs of latest revisions of all pages (meta-current)
280  // * gzipped stubs of latest revisions of all pages of namespage 0
281  // (articles)
282  //
283  // We reproduce such a setup with our mini fixture, although we omit
284  // chunks, and all the other gimmicks of xmldumps-backup.
285  //
286  $this->checkHasGzip();
287 
288  $fnameMetaHistory = $this->getNewTempFile();
289  $fnameMetaCurrent = $this->getNewTempFile();
290  $fnameArticles = $this->getNewTempFile();
291 
292  $dumper = new BackupDumper( array( "--output=gzip:" . $fnameMetaHistory,
293  "--output=gzip:" . $fnameMetaCurrent, "--filter=latest",
294  "--output=gzip:" . $fnameArticles, "--filter=latest",
295  "--filter=notalk", "--filter=namespace:!NS_USER",
296  "--reporting=1000" ) );
297  $dumper->startId = $this->pageId1;
298  $dumper->endId = $this->pageId4 + 1;
299  $dumper->setDb( $this->db );
300 
301  // xmldumps-backup uses reporting. We will not check the exact reported
302  // message, as they are dependent on the processing power of the used
303  // computer. We only check that reporting does not crash the dumping
304  // and that something is reported
305  $dumper->stderr = fopen( 'php://output', 'a' );
306  if ( $dumper->stderr === false ) {
307  $this->fail( "Could not open stream for stderr" );
308  }
309 
310  // Performing the dump
312 
313  $this->assertTrue( fclose( $dumper->stderr ), "Closing stderr handle" );
314 
315  // Checking meta-history -------------------------------------------------
316 
317  $this->gunzip( $fnameMetaHistory );
318  $this->assertDumpStart( $fnameMetaHistory );
319 
320  // Page 1
321  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
322  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
323  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87" );
324  $this->assertPageEnd();
325 
326  // Page 2
327  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
328  $this->assertRevision( $this->revId2_1, "BackupDumperTestP2Summary1",
329  $this->textId2_1, 23, "jprywrymfhysqllua29tj3sc7z39dl2" );
330  $this->assertRevision( $this->revId2_2, "BackupDumperTestP2Summary2",
331  $this->textId2_2, 23, "b7vj5ks32po5m1z1t1br4o7scdwwy95", false, $this->revId2_1 );
332  $this->assertRevision( $this->revId2_3, "BackupDumperTestP2Summary3",
333  $this->textId2_3, 23, "jfunqmh1ssfb8rs43r19w98k28gg56r", false, $this->revId2_2 );
334  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
335  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv", false, $this->revId2_3 );
336  $this->assertPageEnd();
337 
338  // Page 3
339  // -> Page is marked deleted. Hence not visible
340 
341  // Page 4
342  $this->assertPageStart( $this->pageId4, $this->talk_namespace, $this->pageTitle4->getPrefixedText() );
343  $this->assertRevision( $this->revId4_1, "Talk BackupDumperTestP1 Summary1",
344  $this->textId4_1, 35, "nktofwzd0tl192k3zfepmlzxoax1lpe" );
345  $this->assertPageEnd();
346 
347  $this->assertDumpEnd();
348 
349  // Checking meta-current -------------------------------------------------
350 
351  $this->gunzip( $fnameMetaCurrent );
352  $this->assertDumpStart( $fnameMetaCurrent );
353 
354  // Page 1
355  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
356  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
357  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87" );
358  $this->assertPageEnd();
359 
360  // Page 2
361  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
362  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
363  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv", false, $this->revId2_3 );
364  $this->assertPageEnd();
365 
366  // Page 3
367  // -> Page is marked deleted. Hence not visible
368 
369  // Page 4
370  $this->assertPageStart( $this->pageId4, $this->talk_namespace, $this->pageTitle4->getPrefixedText() );
371  $this->assertRevision( $this->revId4_1, "Talk BackupDumperTestP1 Summary1",
372  $this->textId4_1, 35, "nktofwzd0tl192k3zfepmlzxoax1lpe" );
373  $this->assertPageEnd();
374 
375  $this->assertDumpEnd();
376 
377  // Checking articles -------------------------------------------------
378 
379  $this->gunzip( $fnameArticles );
380  $this->assertDumpStart( $fnameArticles );
381 
382  // Page 1
383  $this->assertPageStart( $this->pageId1, $this->namespace, $this->pageTitle1->getPrefixedText() );
384  $this->assertRevision( $this->revId1_1, "BackupDumperTestP1Summary1",
385  $this->textId1_1, 23, "0bolhl6ol7i6x0e7yq91gxgaan39j87" );
386  $this->assertPageEnd();
387 
388  // Page 2
389  $this->assertPageStart( $this->pageId2, $this->namespace, $this->pageTitle2->getPrefixedText() );
390  $this->assertRevision( $this->revId2_4, "BackupDumperTestP2Summary4 extra",
391  $this->textId2_4, 44, "6o1ciaxa6pybnqprmungwofc4lv00wv", false, $this->revId2_3 );
392  $this->assertPageEnd();
393 
394  // Page 3
395  // -> Page is marked deleted. Hence not visible
396 
397  // Page 4
398  // -> Page is not in $this->namespace. Hence not visible
399 
400  $this->assertDumpEnd();
401 
402  $this->expectETAOutput();
403  }
404 }
BackupDumperPageTest\$pageId4
$pageId4
Definition: backup_PageTest.php:13
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:189
BackupDumperPageTest\$textId3_2
$textId3_2
Definition: backup_PageTest.php:18
BackupDumperPageTest\$textId2_1
$textId2_1
Definition: backup_PageTest.php:16
DumpTestCase
Base TestCase for dumps.
Definition: DumpTestCase.php:6
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
$dumper
$dumper
Definition: dumpBackup.php:35
BackupDumperPageTest\$pageId3
$pageId3
Definition: backup_PageTest.php:13
BackupDumperPageTest\testXmlDumpsBackupUseCase
testXmlDumpsBackupUseCase()
Definition: backup_PageTest.php:275
DumpTestCase\assertPageEnd
assertPageEnd()
Asserts that the xml reader is at the page's closing element and skips to the next element.
Definition: DumpTestCase.php:280
BackupDumperPageTest\$revId3_2
$revId3_2
Definition: backup_PageTest.php:18
WikiExporter\CURRENT
const CURRENT
Definition: Export.php:41
BackupDumperPageTest\testCurrentStubGzip
testCurrentStubGzip()
Definition: backup_PageTest.php:233
BackupDumperPageTest\addDBData
addDBData()
Stub.
Definition: backup_PageTest.php:22
BackupDumperPageTest\$pageTitle5
$pageTitle5
Definition: backup_PageTest.php:14
BackupDumperPageTest\$namespace
$namespace
Definition: backup_PageTest.php:20
$fname
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
Definition: Setup.php:35
BackupDumperPageTest
Tests for page dumps of BackupDumper.
Definition: backup_PageTest.php:9
fail
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request fail
Definition: hooks.txt:375
DumpTestCase\assertDumpEnd
assertDumpEnd( $name="mediawiki")
Asserts that the xml reader is at the final closing tag of an xml file and closes the reader.
Definition: DumpTestCase.php:176
WikiExporter\STUB
const STUB
Definition: Export.php:50
BackupDumperPageTest\$textId4_1
$textId4_1
Definition: backup_PageTest.php:19
MWException
MediaWiki exception.
Definition: MWException.php:26
WikiPage\factory
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
Definition: WikiPage.php:103
BackupDumperPageTest\setUp
setUp()
Default set up function.
Definition: backup_PageTest.php:85
WikiExporter\TEXT
const TEXT
Definition: Export.php:49
BackupDumperPageTest\$revId4_1
$revId4_1
Definition: backup_PageTest.php:19
MediaWikiTestCase\setMwGlobals
setMwGlobals( $pairs, $value=null)
Definition: MediaWikiTestCase.php:302
MediaWikiTestCase\getNewTempFile
getNewTempFile()
Obtains a new temporary file name.
Definition: MediaWikiTestCase.php:156
BackupDumperPageTest\$pageTitle2
$pageTitle2
Definition: backup_PageTest.php:14
BackupDumperPageTest\$textId1_1
$textId1_1
Definition: backup_PageTest.php:15
BackupDumperPageTest\$revId2_2
$revId2_2
Definition: backup_PageTest.php:16
DumpTestCase\assertPageStart
assertPageStart( $id, $ns, $name)
Asserts that the xml reader is at the start of a page element and skips over the first tags,...
Definition: DumpTestCase.php:266
BackupDumperPageTest\$textId2_2
$textId2_2
Definition: backup_PageTest.php:16
BackupDumperPageTest\$pageTitle3
$pageTitle3
Definition: backup_PageTest.php:14
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
MediaWikiTestCase\getDefaultWikitextNS
getDefaultWikitextNS()
Returns the ID of a namespace that defaults to Wikitext.
Definition: MediaWikiTestCase.php:903
DumpTestCase\expectETAOutput
expectETAOutput()
Checks for test output consisting only of lines containing ETA announcements.
Definition: DumpTestCase.php:90
BackupDumperPageTest\$talk_namespace
$talk_namespace
Definition: backup_PageTest.php:20
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
BackupDumperPageTest\$textId2_3
$textId2_3
Definition: backup_PageTest.php:17
BackupDumperPageTest\$revId2_1
$revId2_1
Definition: backup_PageTest.php:16
BackupDumperPageTest\$textId3_1
$textId3_1
Definition: backup_PageTest.php:18
MediaWikiTestCase\checkHasGzip
checkHasGzip()
Check whether we have the 'gzip' commandline utility, will skip the test whenever "gzip -V" fails.
Definition: MediaWikiTestCase.php:983
BackupDumperPageTest\$pageId5
$pageId5
Definition: backup_PageTest.php:13
BackupDumperPageTest\$revId1_1
$revId1_1
Definition: backup_PageTest.php:15
WikiExporter\FULL
const FULL
Definition: Export.php:40
BackupDumperPageTest\$pageTitle1
$pageTitle1
Definition: backup_PageTest.php:14
DumpTestCase\assertDumpStart
assertDumpStart( $fname, $skip_siteinfo=true)
Opens an XML file to analyze and optionally skips past siteinfo.
Definition: DumpTestCase.php:159
BackupDumperPageTest\$pageId1
$pageId1
Definition: backup_PageTest.php:13
BackupDumper
Definition: backup.inc:39
BackupDumperPageTest\$textId2_4
$textId2_4
Definition: backup_PageTest.php:17
BackupDumperPageTest\testFullStubPlain
testFullStubPlain()
Definition: backup_PageTest.php:149
BackupDumperPageTest\testCurrentStubPlain
testCurrentStubPlain()
Definition: backup_PageTest.php:194
BackupDumperPageTest\$revId3_1
$revId3_1
Definition: backup_PageTest.php:18
BackupDumperPageTest\$pageTitle4
$pageTitle4
Definition: backup_PageTest.php:14
DumpTestCase\gunzip
gunzip( $fname)
gunzips the given file and stores the result in the original file name
Definition: DumpTestCase.php:55
NS_TALK
const NS_TALK
Definition: Defines.php:80
Language\factory
static factory( $code)
Get a cached or new language object for a given language code.
Definition: Language.php:184
BackupDumperPageTest\testFullTextPlain
testFullTextPlain()
Definition: backup_PageTest.php:98
$e
if( $useReadline) $e
Definition: eval.php:66
BackupDumperPageTest\$revId2_3
$revId2_3
Definition: backup_PageTest.php:17
BackupDumperPageTest\$revId2_4
$revId2_4
Definition: backup_PageTest.php:17
DumpTestCase\assertRevision
assertRevision( $id, $summary, $text_id, $text_bytes, $text_sha1, $text=false, $parentid=false, $model=CONTENT_MODEL_WIKITEXT, $format=CONTENT_FORMAT_WIKITEXT)
Asserts that the xml reader is at a revision and checks its representation before skipping over it.
Definition: DumpTestCase.php:300
BackupDumperPageTest\$pageId2
$pageId2
Definition: backup_PageTest.php:13
DumpTestCase\addRevision
addRevision(Page $page, $text, $summary)
Adds a revision to a page, while returning the resuting revision's id.
Definition: DumpTestCase.php:35