Allow PHPUnit 6 optionally in require-dev
[lhc/web/wiklou.git] / tests / phpunit / phpunit.php
index a78bd82..7cf042d 100755 (executable)
@@ -80,7 +80,7 @@ class PHPUnitMaintClass extends Maintenance {
                                [ '--configuration', $IP . '/tests/phpunit/suite.xml' ] );
                }
 
-               $phpUnitClass = 'PHPUnit_TextUI_Command';
+               $phpUnitClass = PHPUnit_TextUI_Command::class;
 
                if ( $this->hasOption( 'with-phpunitclass' ) ) {
                        $phpUnitClass = $this->getOption( 'with-phpunitclass' );
@@ -113,7 +113,7 @@ class PHPUnitMaintClass extends Maintenance {
                        }
                }
 
-               if ( !class_exists( 'PHPUnit_Framework_TestCase' ) ) {
+               if ( !class_exists( 'PHPUnit\\Framework\\TestCase' ) ) {
                        echo "PHPUnit not found. Please install it and other dev dependencies by
                running `composer install` in MediaWiki root directory.\n";
                        exit( 1 );