class ImportTest extends MediaWikiLangTestCase {
private function getInputStreamSource( $xml ) {
+ if ( ini_get( 'allow_url_fopen' ) != 1 ) {
+ $this->markTestSkipped( 'bug 73283: this test needs allow_url_fopen to be enabled' );
+ }
$file = 'data:application/xml,' . $xml;
$status = ImportStreamSource::newFromFile( $file );
if ( !$status->isGood() ) {
}
};
- $importer = new WikiImporter( $source, ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $importer = new WikiImporter(
+ $source,
+ ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ );
$importer->setPageOutCallback( $callback );
$importer->doImport();
}
public function getRedirectXML() {
+ // @codingStandardsIgnoreStart Generic.Files.LineLength
return array(
array(
<<< EOF
null
),
);
+ // @codingStandardsIgnoreEnd
}
/**
$importNamespaces = $siteinfo['_namespaces'];
};
- $importer = new WikiImporter( $source, ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+ $importer = new WikiImporter(
+ $source,
+ ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+ );
$importer->setSiteInfoCallback( $callback );
$importer->doImport();
}
public function getSiteInfoXML() {
+ // @codingStandardsIgnoreStart Generic.Files.LineLength
return array(
array(
<<< EOF
)
),
);
+ // @codingStandardsIgnoreEnd
}
}