From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- tests/phpunit/StructureTest.php | 60 ----------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 tests/phpunit/StructureTest.php (limited to 'tests/phpunit/StructureTest.php') diff --git a/tests/phpunit/StructureTest.php b/tests/phpunit/StructureTest.php deleted file mode 100644 index 17ea06c4..00000000 --- a/tests/phpunit/StructureTest.php +++ /dev/null @@ -1,60 +0,0 @@ -markTestSkipped( 'This test does not work on Windows' ); - } - $rootPath = escapeshellarg( __DIR__ ); - $testClassRegex = implode( '|', array( - 'ApiFormatTestBase', - 'ApiTestCase', - 'MediaWikiLangTestCase', - 'MediaWikiTestCase', - 'PHPUnit_Framework_TestCase', - 'DumpTestCase', - ) ); - $testClassRegex = "^class .* extends ($testClassRegex)"; - $finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" . - " | xargs grep -El '$testClassRegex|function suite\('"; - - $results = null; - $exitCode = null; - exec($finder, $results, $exitCode); - - $this->assertEquals( - 0, - $exitCode, - 'Verify find/grep command succeeds.' - ); - - $results = array_filter( - $results, - array( $this, 'filterSuites' ) - ); - $strip = strlen( $rootPath ) - 1; - foreach( $results as $k => $v) { - $results[$k] = substr( $v, $strip ); - } - $this->assertEquals( - array(), - $results, - "Unit test file in $rootPath must end with Test." - ); - } - - /** - * Filter to remove testUnitTestFileNamesEndWithTest false positives. - */ - public function filterSuites( $filename ) { - return strpos( $filename, __DIR__ . '/suites/' ) !== 0; - } -} -- cgit v1.2.3-54-g00ecf