From 55ed5a6495a62201541daa2ba93ebcfc86a0ba00 Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Mon, 3 Feb 2014 15:32:58 -0800 Subject: [PATCH] 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: --- dev/SapphireTestReporter.php | 12 ++++++++++++ dev/TestListener.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/dev/SapphireTestReporter.php b/dev/SapphireTestReporter.php index 8b660aafa..eee7c4b44 100644 --- a/dev/SapphireTestReporter.php +++ b/dev/SapphireTestReporter.php @@ -246,6 +246,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 * to enable us to give a bit more detail about the failure/error diff --git a/dev/TestListener.php b/dev/TestListener.php index e6bb43d1f..5eab9e7b4 100644 --- a/dev/TestListener.php +++ b/dev/TestListener.php @@ -38,6 +38,18 @@ class SS_TestListener implements PHPUnit_Framework_TestListener { $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 * @return boolean