Merge "Add more test cases to OldChangesListTest"
[lhc/web/wiklou.git] / tests / phpunit / includes / ImportTest.php
index ea753e8..8ee2ad5 100644 (file)
@@ -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
        }
 
 }