/**
* Verify all files that appear to be tests have file names ending in
* Test. If the file names do not end in Test, they will not be run.
+ * @group medium
*/
public function testUnitTestFileNamesEndWithTest() {
+ if ( wfIsWindows() ) {
+ $this->markTestSkipped( 'This test does not work on Windows' );
+ }
$rootPath = escapeshellarg( __DIR__ );
$testClassRegex = implode( '|', array(
'ApiFormatTestBase',
'MediaWikiLangTestCase',
'MediaWikiTestCase',
'PHPUnit_Framework_TestCase',
+ 'DumpTestCase',
) );
$testClassRegex = "^class .* extends ($testClassRegex)";
$finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
$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 names must end with Test.'
+ "Unit test file in $rootPath must end with Test."
);
}