Support PHPUnit 3.8+ compatibility

Summary:

PHPUnit 3.8+ adds a method to its PHPUnit_Framework_TestListener called addRiskyTest(). Need to stub it out to avoid "must implement this interface method" fatals when using 3.8+

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
This commit is contained in:
Joel Marcey 2014-02-03 15:32:58 -08:00
parent d0ec30dd26
commit 0da5413e8d
4 changed files with 48 additions and 0 deletions

View File

@ -300,6 +300,18 @@ class SapphireTestReporter implements PHPUnit_Framework_TestListener {
} }
} }
/**
* Risky test.
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @since Method available since Release 3.8.0
*/
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
// Stub out to support PHPUnit 3.8
}
/** /**
* Trys to get the original exception thrown by the test on failure/error * Trys to get the original exception thrown by the test on failure/error
* to enable us to give a bit more detail about the failure/error * to enable us to give a bit more detail about the failure/error

View File

@ -46,4 +46,16 @@ class SilverStripeListener implements PHPUnit_Framework_TestListener {
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) { public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
} }
/**
* Risky test.
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @since Method available since Release 3.8.0
*/
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
// Stub out to support PHPUnit 3.8
}
} }

View File

@ -61,4 +61,16 @@ class TeamCityListener implements PHPUnit_Framework_TestListener {
$message = $this->escape($e->getMessage()); $message = $this->escape($e->getMessage());
echo "##teamcity[testIgnored name='{$class}.{$test->getName()}' message='$message']\n"; echo "##teamcity[testIgnored name='{$class}.{$test->getName()}' message='$message']\n";
} }
/**
* Risky test.
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @since Method available since Release 3.8.0
*/
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
// Stub out to support PHPUnit 3.8
}
} }

View File

@ -38,6 +38,18 @@ class SS_TestListener implements PHPUnit_Framework_TestListener {
$this->class->tearDownOnce(); $this->class->tearDownOnce();
} }
/**
* Risky test.
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @since Method available since Release 3.8.0
*/
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
// Stub out to support PHPUnit 3.8
}
/** /**
* @param String Classname * @param String Classname
* @return boolean * @return boolean