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