X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FMediaWikiPHPUnitCommand.php;h=6b1d8177e5801235cc08fbb8f1ccedb125b934d3;hb=632a82ec8e03ea701f257b96bc092d520385c47e;hp=5d139ff7e6f202ce80c56d9683cf422b23e901b4;hpb=6353652fcf9c907095ead961706feb5c7395ed7c;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/MediaWikiPHPUnitCommand.php b/tests/phpunit/MediaWikiPHPUnitCommand.php index 5d139ff7e6..6b1d8177e5 100644 --- a/tests/phpunit/MediaWikiPHPUnitCommand.php +++ b/tests/phpunit/MediaWikiPHPUnitCommand.php @@ -2,7 +2,6 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command { private $cliArgs; - private $logListener; public function __construct( $ignorableOptions, $cliArgs ) { $ignore = function ( $arg ) { @@ -21,22 +20,19 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command { // Add our own listeners $this->arguments['listeners'][] = new MediaWikiPHPUnitTestListener; - $this->logListener = new MediaWikiLoggerPHPUnitTestListener; - $this->arguments['listeners'][] = $this->logListener; + $this->arguments['listeners'][] = new MediaWikiLoggerPHPUnitTestListener; // Output only to stderr to avoid "Headers already sent" problems $this->arguments['stderr'] = true; - // We could create a printer instance and avoid passing the - // listener statically, but then we have to recreate the - // appropriate arguments handling + defaults. + // Use a custom result printer that includes per-test logging output + // when nothing is provided. if ( !isset( $this->arguments['printer'] ) ) { $this->arguments['printer'] = MediaWikiPHPUnitResultPrinter::class; } } protected function createRunner() { - MediaWikiPHPUnitResultPrinter::setLogListener( $this->logListener ); $runner = new MediaWikiTestRunner; $runner->setMwCliArgs( $this->cliArgs ); return $runner;