X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FMediaWikiPHPUnitTestListener.php;h=0a162a283de887f9a759533db83b9945b74ba393;hb=8ae7ebd638d1a366a2a472df90766b40c4bf8694;hp=9eeb251e13d56b16116200ad149106d6b86438cf;hpb=7bbc880626c92055f1ff22deb90d132f8f766160;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/MediaWikiPHPUnitTestListener.php b/tests/phpunit/MediaWikiPHPUnitTestListener.php index 9eeb251e13..0a162a283d 100644 --- a/tests/phpunit/MediaWikiPHPUnitTestListener.php +++ b/tests/phpunit/MediaWikiPHPUnitTestListener.php @@ -1,19 +1,17 @@ logChannel = $logChannel; - } + protected $logChannel = 'PHPUnitCommand'; protected function getTestName( PHPUnit_Framework_Test $test ) { $name = get_class( $test ); - if ( $test instanceof PHPUnit_Framework_TestCase ) { + if ( $test instanceof PHPUnit\Framework\TestCase ) { $name .= '::' . $test->getName( true ); } @@ -35,6 +33,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param float $time */ public function addError( PHPUnit_Framework_Test $test, Exception $e, $time ) { + parent::addError( $test, $e, $time ); wfDebugLog( $this->logChannel, 'ERROR in ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e ) @@ -51,6 +50,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { public function addFailure( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time ) { + parent::addFailure( $test, $e, $time ); wfDebugLog( $this->logChannel, 'FAILURE in ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e ) @@ -65,6 +65,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param float $time */ public function addIncompleteTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { + parent::addIncompleteTest( $test, $e, $time ); wfDebugLog( $this->logChannel, 'Incomplete test ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e ) @@ -77,10 +78,9 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param PHPUnit_Framework_Test $test * @param Exception $e * @param float $time - * - * @since Method available since Release 3.0.0 */ public function addSkippedTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { + parent::addSkippedTest( $test, $e, $time ); wfDebugLog( $this->logChannel, 'Skipped test ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e ) @@ -91,9 +91,9 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * A test suite started. * * @param PHPUnit_Framework_TestSuite $suite - * @since Method available since Release 2.2.0 */ public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) { + parent::startTestSuite( $suite ); wfDebugLog( $this->logChannel, 'START suite ' . $suite->getName() ); } @@ -101,9 +101,9 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * A test suite ended. * * @param PHPUnit_Framework_TestSuite $suite - * @since Method available since Release 2.2.0 */ public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) { + parent::endTestSuite( $suite ); wfDebugLog( $this->logChannel, 'END suite ' . $suite->getName() ); } @@ -113,6 +113,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param PHPUnit_Framework_Test $test */ public function startTest( PHPUnit_Framework_Test $test ) { + parent::startTest( $test ); wfDebugLog( $this->logChannel, 'Start test ' . $this->getTestName( $test ) ); } @@ -123,6 +124,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param float $time */ public function endTest( PHPUnit_Framework_Test $test, $time ) { + parent::endTest( $test, $time ); wfDebugLog( $this->logChannel, 'End test ' . $this->getTestName( $test ) ); } }