If unit tests are namespaced under Tests/Unit/, with tests/phpunit being
the PSR4 root Tests/, then the the unit test directory cannot be named unit/.
The autoloader will not be able to find the files in that namespace, as
it will be looking for the directory Unit/, not unit/.
Change-Id: I8cf6cd31f22decb061650def9e1e5d8893dfa73f
parent::setUp();
$reflection = new ReflectionClass( $this );
$dirSeparator = DIRECTORY_SEPARATOR;
- if ( strpos( $reflection->getFilename(), "${dirSeparator}unit${dirSeparator}" ) === false ) {
+ if ( stripos( $reflection->getFilename(), "${dirSeparator}unit${dirSeparator}" ) === false ) {
$this->fail( 'This unit test needs to be in "tests/phpunit/unit"!' );
}
$this->unitGlobals = $GLOBALS;