'use-bagostuff' => false,
'use-jobqueue' => false,
'use-normal-tables' => false,
+ 'mwdebug' => false,
'reuse-db' => false,
'wiki' => false,
'profiler' => false,
[ '--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' );
}
}
- 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 );
exit( 1 );
}
- echo defined( 'HHVM_VERSION' ) ?
+ fwrite( STDERR, defined( 'HHVM_VERSION' ) ?
'Using HHVM ' . HHVM_VERSION . ' (' . PHP_VERSION . ")\n" :
- 'Using PHP ' . PHP_VERSION . "\n";
+ 'Using PHP ' . PHP_VERSION . "\n" );
// Prepare global services for unit tests.
MediaWikiTestCase::prepareServices( new GlobalVarConfig() );
return Maintenance::DB_ADMIN;
}
+ protected function addOption( $name, $description, $required = false,
+ $withArg = false, $shortName = false, $multiOccurrence = false
+ ) {
+ // ignore --quiet which does not really make sense for unit tests
+ if ( $name !== 'quiet' ) {
+ parent::addOption( $name, $description, $required, $withArg, $shortName, $multiOccurrence );
+ }
+ }
+
/**
* Force the format of elements in $_SERVER['argv']
* - Split args such as "wiki=enwiki" into two separate arg elements "wiki" and "enwiki"