Skip to content

Commit

Permalink
Support PHPUnit 3.8+ compatibility
Browse files Browse the repository at this point in the history
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:
  • Loading branch information
Joel Marcey authored and Sean Harvey committed Aug 21, 2014
1 parent 4b757ea commit 55ed5a6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dev/SapphireTestReporter.php
Expand Up @@ -246,6 +246,18 @@ public function endTestSuite( PHPUnit_Framework_TestSuite $suite) {
}
}

/**
* 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
Expand Down
12 changes: 12 additions & 0 deletions dev/TestListener.php
Expand Up @@ -38,6 +38,18 @@ public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
$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
Expand Down

0 comments on commit 55ed5a6

Please sign in to comment.