$this->tablesUsed[] = 'revision';
$this->tablesUsed[] = 'text';
+ $ns = $this->getDefaultWikitextNS();
+
try {
// Simple page
- $title = Title::newFromText( 'BackupDumperTestP1' );
+ $title = Title::newFromText( 'BackupDumperTestP1', $ns );
$page = WikiPage::factory( $title );
list( $this->revId1_1, $this->textId1_1 ) = $this->addRevision( $page,
"BackupDumperTestP1Text1", "BackupDumperTestP1Summary1" );
$this->pageId1 = $page->getId();
// Page with more than one revision
- $title = Title::newFromText( 'BackupDumperTestP2' );
+ $title = Title::newFromText( 'BackupDumperTestP2', $ns );
$page = WikiPage::factory( $title );
list( $this->revId2_1, $this->textId2_1 ) = $this->addRevision( $page,
"BackupDumperTestP2Text1", "BackupDumperTestP2Summary1" );
$this->pageId2 = $page->getId();
// Deleted page.
- $title = Title::newFromText( 'BackupDumperTestP3' );
+ $title = Title::newFromText( 'BackupDumperTestP3', $ns );
$page = WikiPage::factory( $title );
list( $this->revId3_1, $this->textId3_1 ) = $this->addRevision( $page,
"BackupDumperTestP3Text1", "BackupDumperTestP2Summary1" );
$page->doDeleteArticle( "Testing ;)" );
// Page from non-default namespace
+
+ if ( $ns === NS_TALK ) {
+ //@todo: work around this.
+ throw new MWException( "The default wikitext namespace is the talk namespace. "
+ . " We can't currently deal with that.");
+ }
+
$title = Title::newFromText( 'BackupDumperTestP1', NS_TALK );
$page = WikiPage::factory( $title );
list( $this->revId4_1, $this->textId4_1 ) = $this->addRevision( $page,
}
- public function setUp() {
+ protected function setUp() {
parent::setUp();
// Since we will restrict dumping by page ranges (to allow
$dumper->stderr = $stderr;
// The actual dump and taking time
- $ts_before = wfTime();
+ $ts_before = microtime( true );
$dumper->dump( WikiExporter::FULL, WikiExporter::TEXT );
- $ts_after = wfTime();
+ $ts_after = microtime( true );
$lastDuration = $ts_after - $ts_before;
// Handling increasing the iteration count for the stubs
$this->assertEmpty( $files, "Remaining unchecked files" );
// ... and have dealt with more than one checkpoint file
- $this->assertGreaterThan( 1, $checkpointFiles, "# of checkpoint files" );
+ $this->assertGreaterThan( 1, $checkpointFiles, "expected more than 1 checkpoint to have been created. Checkpoint interval is $checkpointAfter seconds, maybe your computer is too fast?" );
$this->expectETAOutput();
}
<siteinfo>
<sitename>wikisvn</sitename>
<base>http://localhost/wiki-svn/index.php/Main_Page</base>
- <generator>MediaWiki 1.20alpha</generator>
+ <generator>MediaWiki 1.21alpha</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
</contributor>
<comment>BackupDumperTestP1Summary1</comment>
<sha1>0bolhl6ol7i6x0e7yq91gxgaan39j87</sha1>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
<text id="' . $this->textId1_1 . '" bytes="23" />
</revision>
</page>
</contributor>
<comment>BackupDumperTestP2Summary1</comment>
<sha1>jprywrymfhysqllua29tj3sc7z39dl2</sha1>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
<text id="' . $this->textId2_1 . '" bytes="23" />
</revision>
<revision>
</contributor>
<comment>BackupDumperTestP2Summary2</comment>
<sha1>b7vj5ks32po5m1z1t1br4o7scdwwy95</sha1>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
<text id="' . $this->textId2_2 . '" bytes="23" />
</revision>
<revision>
</contributor>
<comment>BackupDumperTestP2Summary3</comment>
<sha1>jfunqmh1ssfb8rs43r19w98k28gg56r</sha1>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
<text id="' . $this->textId2_3 . '" bytes="23" />
</revision>
<revision>
</contributor>
<comment>BackupDumperTestP2Summary4 extra</comment>
<sha1>6o1ciaxa6pybnqprmungwofc4lv00wv</sha1>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
<text id="' . $this->textId2_4 . '" bytes="44" />
</revision>
</page>
</contributor>
<comment>Talk BackupDumperTestP1 Summary1</comment>
<sha1>nktofwzd0tl192k3zfepmlzxoax1lpe</sha1>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
<text id="' . $this->textId4_1 . '" bytes="35" />
</revision>
</page>