X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FMediaWikiPHPUnitTestListener.php;h=6f982ad27dd2312e03ffaad8bb830fe94bfd935c;hb=4ab8dc680e016d9b33c7f16188c14bf11c008e42;hp=9eeb251e13d56b16116200ad149106d6b86438cf;hpb=166191535f486569277e95b7e6a3850b5db6757d;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/MediaWikiPHPUnitTestListener.php b/tests/phpunit/MediaWikiPHPUnitTestListener.php index 9eeb251e13..6f982ad27d 100644 --- a/tests/phpunit/MediaWikiPHPUnitTestListener.php +++ b/tests/phpunit/MediaWikiPHPUnitTestListener.php @@ -1,19 +1,16 @@ 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 ); } @@ -77,8 +74,6 @@ 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 ) { wfDebugLog( @@ -91,7 +86,6 @@ 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 ) { wfDebugLog( $this->logChannel, 'START suite ' . $suite->getName() ); @@ -101,7 +95,6 @@ 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 ) { wfDebugLog( $this->logChannel, 'END suite ' . $suite->getName() ); @@ -113,6 +106,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param PHPUnit_Framework_Test $test */ public function startTest( PHPUnit_Framework_Test $test ) { + Hooks::run( 'MediaWikiPHPUnitTest::startTest', [ $test ] ); wfDebugLog( $this->logChannel, 'Start test ' . $this->getTestName( $test ) ); } @@ -123,6 +117,7 @@ class MediaWikiPHPUnitTestListener implements PHPUnit_Framework_TestListener { * @param float $time */ public function endTest( PHPUnit_Framework_Test $test, $time ) { + Hooks::run( 'MediaWikiPHPUnitTest::endTest', [ $test, $time ] ); wfDebugLog( $this->logChannel, 'End test ' . $this->getTestName( $test ) ); } }