dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Title: Test the ->equals() method more thoughroughly"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
MediaWikiPHPUnitTestListener.php
diff --git
a/tests/phpunit/MediaWikiPHPUnitTestListener.php
b/tests/phpunit/MediaWikiPHPUnitTestListener.php
index
08463f1
..
6f982ad
100644
(file)
--- a/
tests/phpunit/MediaWikiPHPUnitTestListener.php
+++ b/
tests/phpunit/MediaWikiPHPUnitTestListener.php
@@
-1,6
+1,6
@@
<?php
<?php
-class MediaWikiPHPUnitTestListener extends PHPUnit_
TextUI_ResultPrinter implements PHPUnit_Framework_
TestListener {
+class MediaWikiPHPUnitTestListener extends PHPUnit_
Framework_Base
TestListener {
/**
* @var string
/**
* @var string
@@
-10,7
+10,7
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
protected function getTestName( PHPUnit_Framework_Test $test ) {
$name = get_class( $test );
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 );
}
$name .= '::' . $test->getName( true );
}
@@
-32,7
+32,6
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param float $time
*/
public function addError( PHPUnit_Framework_Test $test, Exception $e, $time ) {
* @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 )
wfDebugLog(
$this->logChannel,
'ERROR in ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e )
@@
-49,7
+48,6
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
public function addFailure( PHPUnit_Framework_Test $test,
PHPUnit_Framework_AssertionFailedError $e, $time
) {
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 )
wfDebugLog(
$this->logChannel,
'FAILURE in ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e )
@@
-64,7
+62,6
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param float $time
*/
public function addIncompleteTest( PHPUnit_Framework_Test $test, Exception $e, $time ) {
* @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 )
wfDebugLog(
$this->logChannel,
'Incomplete test ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e )
@@
-79,7
+76,6
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param float $time
*/
public function addSkippedTest( PHPUnit_Framework_Test $test, Exception $e, $time ) {
* @param float $time
*/
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 )
wfDebugLog(
$this->logChannel,
'Skipped test ' . $this->getTestName( $test ) . ': ' . $this->getErrorName( $e )
@@
-92,7
+88,6
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param PHPUnit_Framework_TestSuite $suite
*/
public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) {
* @param PHPUnit_Framework_TestSuite $suite
*/
public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) {
- parent::startTestSuite( $suite );
wfDebugLog( $this->logChannel, 'START suite ' . $suite->getName() );
}
wfDebugLog( $this->logChannel, 'START suite ' . $suite->getName() );
}
@@
-102,7
+97,6
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param PHPUnit_Framework_TestSuite $suite
*/
public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) {
* @param PHPUnit_Framework_TestSuite $suite
*/
public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) {
- parent::endTestSuite( $suite );
wfDebugLog( $this->logChannel, 'END suite ' . $suite->getName() );
}
wfDebugLog( $this->logChannel, 'END suite ' . $suite->getName() );
}
@@
-112,7
+106,7
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param PHPUnit_Framework_Test $test
*/
public function startTest( PHPUnit_Framework_Test $test ) {
* @param PHPUnit_Framework_Test $test
*/
public function startTest( PHPUnit_Framework_Test $test ) {
-
parent::startTest( $test
);
+
Hooks::run( 'MediaWikiPHPUnitTest::startTest', [ $test ]
);
wfDebugLog( $this->logChannel, 'Start test ' . $this->getTestName( $test ) );
}
wfDebugLog( $this->logChannel, 'Start test ' . $this->getTestName( $test ) );
}
@@
-123,7
+117,7
@@
class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implemen
* @param float $time
*/
public function endTest( PHPUnit_Framework_Test $test, $time ) {
* @param float $time
*/
public function endTest( PHPUnit_Framework_Test $test, $time ) {
-
parent::endTest( $test, $time
);
+
Hooks::run( 'MediaWikiPHPUnitTest::endTest', [ $test, $time ]
);
wfDebugLog( $this->logChannel, 'End test ' . $this->getTestName( $test ) );
}
}
wfDebugLog( $this->logChannel, 'End test ' . $this->getTestName( $test ) );
}
}