X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FImportTest.php;h=8ee2ad5aca78a7aa060333ea35857cab6b8b4eda;hb=df8e1a3d875d0107b1a9ae696bac4c1233e93da1;hp=ea753e815f09c0ab62a8045a0ce338b27980948f;hpb=e2011f50dbff9188003fe1708c7444f34728aa01;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/ImportTest.php b/tests/phpunit/includes/ImportTest.php index ea753e815f..8ee2ad5aca 100644 --- a/tests/phpunit/includes/ImportTest.php +++ b/tests/phpunit/includes/ImportTest.php @@ -10,6 +10,9 @@ 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() ) { @@ -35,7 +38,10 @@ class ImportTest extends MediaWikiLangTestCase { } }; - $importer = new WikiImporter( $source, ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); + $importer = new WikiImporter( + $source, + ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) + ); $importer->setPageOutCallback( $callback ); $importer->doImport(); @@ -43,6 +49,7 @@ class ImportTest extends MediaWikiLangTestCase { } public function getRedirectXML() { + // @codingStandardsIgnoreStart Generic.Files.LineLength return array( array( <<< EOF @@ -97,6 +104,7 @@ EOF null ), ); + // @codingStandardsIgnoreEnd } /** @@ -113,7 +121,10 @@ EOF $importNamespaces = $siteinfo['_namespaces']; }; - $importer = new WikiImporter( $source, ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); + $importer = new WikiImporter( + $source, + ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) + ); $importer->setSiteInfoCallback( $callback ); $importer->doImport(); @@ -121,6 +132,7 @@ EOF } public function getSiteInfoXML() { + // @codingStandardsIgnoreStart Generic.Files.LineLength return array( array( <<< EOF @@ -152,6 +164,7 @@ EOF ) ), ); + // @codingStandardsIgnoreEnd } }