Update suppressWarning()/restoreWarning() calls
[lhc/web/wiklou.git] / tests / phpunit / structure / AutoLoaderTest.php
index d81e8c6..217232e 100644 (file)
@@ -58,9 +58,9 @@ class AutoLoaderTest extends MediaWikiTestCase {
                                continue;
                        }
 
-                       MediaWiki\suppressWarnings();
+                       Wikimedia\suppressWarnings();
                        $contents = file_get_contents( $filePath );
-                       MediaWiki\restoreWarnings();
+                       Wikimedia\restoreWarnings();
 
                        if ( $contents === false ) {
                                $actual[$class] = "[couldn't read file '$filePath']";
@@ -161,6 +161,7 @@ class AutoLoaderTest extends MediaWikiTestCase {
                $path = realpath( __DIR__ . '/../../..' );
                $oldAutoload = file_get_contents( $path . '/autoload.php' );
                $generator = new AutoloadGenerator( $path, 'local' );
+               $generator->setExcludePaths( array_values( AutoLoader::getAutoloadNamespaces() ) );
                $generator->initMediaWikiDefault();
                $newAutoload = $generator->getAutoload( 'maintenance/generateLocalAutoload.php' );