Merge "Permit case independent unit test directories"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 2 Sep 2019 17:08:22 +0000 (17:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 2 Sep 2019 17:08:22 +0000 (17:08 +0000)
tests/phpunit/MediaWikiUnitTestCase.php

index edd8195..bb018aa 100644 (file)
@@ -40,7 +40,7 @@ abstract class MediaWikiUnitTestCase extends TestCase {
                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;