}
public function testImportForImportSource() {
-
$this->doImport( $this->importStreamSource );
// Imported title
* @depends testImportForImportSource
*/
public function testReImportForImportSource() {
-
$this->doImport( $this->importStreamSource );
// ReImported title
}
private function doImport( $importStreamSource ) {
-
$importer = new WikiImporter(
$importStreamSource->value,
MediaWikiServices::getInstance()->getMainConfig()
$reporter->setContext( new RequestContext() );
$reporter->open();
- $exception = false;
- try {
- $importer->doImport();
- } catch ( Exception $e ) {
- $exception = $e;
- }
+ $importer->doImport();
$result = $reporter->close();
- $this->assertFalse(
- $exception
- );
-
$this->assertTrue(
$result->isGood()
);