X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FMediaWikiPHPUnitTestListener.php;h=6f982ad27dd2312e03ffaad8bb830fe94bfd935c;hb=4ab8dc680e016d9b33c7f16188c14bf11c008e42;hp=8c761b90d63e943e404f206ef2f2d03b04e1745d;hpb=1a8daf2c07e31337d83ee39b42873373023c8d40;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/MediaWikiPHPUnitTestListener.php b/tests/phpunit/MediaWikiPHPUnitTestListener.php index 8c761b90d6..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 ); } @@ -109,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 ) ); } @@ -119,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 ) ); } }