When dumping an array, PHPUnit limit the number of characters shown. That would
just hide the relevant part of the path:
1) StructureTest::testUnitTestFileNamesEndWithTest
[...]
Array (
+ 0 => '/some/path/tests/phpunit/incl...ge.php'
+ 1 => '/some/path/tests/phpunit/incl...ki.php'
)
By stripping the common path ( /some/path/tests/phpunit ), we end up with a
more useful output:
Array (
+ 0 => 'includes/RecentChange.php'
+ 1 => 'includes/Wiki.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."
);
}