$this->markTestSkipped( 'This test does not work on Windows' );
}
$rootPath = escapeshellarg( __DIR__ . '/..' );
- $testClassRegex = implode( '|', array(
+ $testClassRegex = implode( '|', [
'ApiFormatTestBase',
'ApiTestCase',
'ApiQueryTestBase',
'MediaWikiTestCase',
'ResourceLoaderTestCase',
'PHPUnit_Framework_TestCase',
+ '\\?PHPUnit\\Framework\\TestCase',
'DumpTestCase',
- ) );
+ ] );
$testClassRegex = "^class .* extends ($testClassRegex)";
$finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
" | xargs grep -El '$testClassRegex|function suite\('";
$results = array_filter(
$results,
- array( $this, 'filterSuites' )
+ [ $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."
);