protected function setUp() {
parent::setUp();
$reflection = new ReflectionClass( $this );
- if ( strpos( $reflection->getFilename(), '/unit/' ) === false ) {
+ $dirSeparator = DIRECTORY_SEPARATOR;
+ if ( strpos( $reflection->getFilename(), "${dirSeparator}unit${dirSeparator}" ) === false ) {
$this->fail( 'This unit test needs to be in "tests/phpunit/unit" !' );
}
$this->unitGlobals = $GLOBALS;