From 2e44b49a2db3026050b136de9b00f749dd3ff939 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 25 Apr 2014 06:26:49 +0200 Subject: Update to MediaWiki 1.22.6 --- tests/phpunit/structure/AutoLoaderTest.php | 56 ------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 tests/phpunit/structure/AutoLoaderTest.php (limited to 'tests/phpunit/structure/AutoLoaderTest.php') diff --git a/tests/phpunit/structure/AutoLoaderTest.php b/tests/phpunit/structure/AutoLoaderTest.php deleted file mode 100644 index 205ea360..00000000 --- a/tests/phpunit/structure/AutoLoaderTest.php +++ /dev/null @@ -1,56 +0,0 @@ -assertEquals( - $results['expected'], - $results['actual'] - ); - } - - protected static function checkAutoLoadConf() { - global $wgAutoloadLocalClasses, $wgAutoloadClasses, $IP; - $supportsParsekit = function_exists( 'parsekit_compile_file' ); - - // wgAutoloadLocalClasses has precedence, just like in includes/AutoLoader.php - $expected = $wgAutoloadLocalClasses + $wgAutoloadClasses; - $actual = array(); - - $files = array_unique( $expected ); - - foreach ( $files as $file ) { - // Only prefix $IP if it doesn't have it already. - // Generally local classes don't have it, and those from extensions and test suites do. - if ( substr( $file, 0, 1 ) != '/' && substr( $file, 1, 1 ) != ':' ) { - $filePath = "$IP/$file"; - } else { - $filePath = $file; - } - if ( $supportsParsekit ) { - $parseInfo = parsekit_compile_file( "$filePath" ); - $classes = array_keys( $parseInfo['class_table'] ); - } else { - $contents = file_get_contents( "$filePath" ); - $m = array(); - preg_match_all( '/\n\s*(?:final)?\s*(?:abstract)?\s*(?:class|interface)\s+([a-zA-Z0-9_]+)/', $contents, $m, PREG_PATTERN_ORDER ); - $classes = $m[1]; - } - foreach ( $classes as $class ) { - $actual[$class] = $file; - } - } - - return array( - 'expected' => $expected, - 'actual' => $actual, - ); - } -} -- cgit v1.2.2