3 class MediaWikiPHPUnitCommand
extends PHPUnit_TextUI_Command
{
5 static $additionalOptions = array(
8 'keep-uploads' => false,
11 public function __construct() {
12 foreach( self
::$additionalOptions as $option => $default ) {
13 $this->longOptions
[$option] = $option . 'Handler';
18 public static function main( $exit = true ) {
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() {
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