Removed testBug29116LoadWithEmptyIp. Fails due to wfDeprecated() call in load() and...
[mediawiki.git] / tests / phpunit / MediaWikiPHPUnitCommand.php
blobc0d9f3637e8d0d861778d55edbd8987b09184dd2
1 <?php
3 class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
5 static $additionalOptions = array(
6 'regex=' => false,
7 'file=' => false,
8 'keep-uploads' => false,
9 );
11 public function __construct() {
12 foreach( self::$additionalOptions as $option => $default ) {
13 $this->longOptions[$option] = $option . 'Handler';
18 public static function main( $exit = true ) {
19 $command = new self;
20 $command->run($_SERVER['argv'], $exit);
23 public function __call( $func, $args ) {
25 if( substr( $func, -7 ) == 'Handler' ) {
26 if( is_null( $args[0] ) ) $args[0] = true; //Booleans
27 self::$additionalOptions[substr( $func, 0, -7 ) ] = $args[0];
31 public function showHelp() {
32 parent::showHelp();
34 print <<<EOT
36 ParserTest-specific options:
38 --regex="<regex>" Only run parser tests that match the given regex
39 --file="<filename>" Prints the version and exits.
40 --keep-uploads Re-use the same upload directory for each test, don't delete it
43 EOT;