15 $this->markTestSkipped(
'This test does not work on Windows' );
17 $rootPath = escapeshellarg( __DIR__ .
'/..' );
18 $testClassRegex = implode(
'|', [
22 'ApiQueryContinueTestBase',
23 'MediaWikiLangTestCase',
24 'MediaWikiMediaTestCase',
26 'ResourceLoaderTestCase',
27 'PHPUnit_Framework_TestCase',
30 $testClassRegex =
"^class .* extends ($testClassRegex)";
31 $finder =
"find $rootPath -name '*.php' '!' -name '*Test.php'" .
32 " | xargs grep -El '$testClassRegex|function suite\('";
36 exec( $finder, $results, $exitCode );
41 'Verify find/grep command succeeds.'
44 $results = array_filter(
46 [ $this,
'filterSuites' ]
48 $strip = strlen( $rootPath ) - 1;
49 foreach ( $results
as $k => $v ) {
50 $results[$k] = substr( $v, $strip );
55 "Unit test file in $rootPath must end with Test."
65 return strpos( $filename, __DIR__ .
'/../suites/' ) !== 0;