summaryrefslogtreecommitdiff
path: root/tests/phpunit/MediaWikiPHPUnitCommand.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/MediaWikiPHPUnitCommand.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/MediaWikiPHPUnitCommand.php')
-rw-r--r--tests/phpunit/MediaWikiPHPUnitCommand.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/phpunit/MediaWikiPHPUnitCommand.php b/tests/phpunit/MediaWikiPHPUnitCommand.php
index 12c2e003..042956a9 100644
--- a/tests/phpunit/MediaWikiPHPUnitCommand.php
+++ b/tests/phpunit/MediaWikiPHPUnitCommand.php
@@ -12,13 +12,29 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
'use-normal-tables' => false,
'reuse-db' => false,
'wiki=' => false,
+ 'debug-tests' => false,
);
public function __construct() {
foreach ( self::$additionalOptions as $option => $default ) {
$this->longOptions[$option] = $option . 'Handler';
}
+ }
+
+ protected function handleArguments( array $argv ) {
+ parent::handleArguments( $argv );
+
+ if ( !isset( $this->arguments['listeners'] ) ) {
+ $this->arguments['listeners'] = array();
+ }
+ foreach ( $this->options[0] as $option ) {
+ switch ( $option[0] ) {
+ case '--debug-tests':
+ $this->arguments['listeners'][] = new MediaWikiPHPUnitTestListener( 'PHPUnitCommand' );
+ break;
+ }
+ }
}
public static function main( $exit = true ) {
@@ -86,7 +102,7 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
ParserTest-specific options:
--regex="<regex>" Only run parser tests that match the given regex
- --file="<filename>" Prints the version and exits.
+ --file="<filename>" File describing parser tests
--keep-uploads Re-use the same upload directory for each test, don't delete it
@@ -95,7 +111,9 @@ Database options:
--reuse-db Init DB only if tables are missing and keep after finish.
+Debugging options:
+ --debug-tests Log testing activity to the PHPUnitCommand log channel.
+
EOT;
}
-
}