From cf771097eab0808fa1d47e2d66fbc657bc6634ee Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 17 Jun 2018 00:44:50 +0100 Subject: [PATCH] Fix TestListener --- tests/TestListener.php | 89 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 9 deletions(-) diff --git a/tests/TestListener.php b/tests/TestListener.php index b92cfb5b..170a7746 100644 --- a/tests/TestListener.php +++ b/tests/TestListener.php @@ -11,24 +11,79 @@ namespace CachetHQ\Tests\Cachet; -use PHPUnit_Framework_BaseTestListener; -use PHPUnit_Framework_TestSuite; +use PHPUnit\Framework\AssertionFailedError; +use PHPUnit\Framework\Test; +use PHPUnit\Framework\TestListener as PHPUnitTestListener; +use PHPUnit\Framework\TestSuite; +use PHPUnit\Framework\Warning; /** * This is the test listener class. * * @author Connor S. Parks */ -class TestListener extends PHPUnit_Framework_BaseTestListener +class TestListener implements PHPUnitTestListener { /** - * A test suite ended. - * - * @param \PHPUnit_Framework_TestSuite $suite - * - * @return void + * An error occurred. */ - public function endTestSuite(PHPUnit_Framework_TestSuite $suite) + public function addError(Test $test, \Throwable $t, float $time): void + { + // + } + + /** + * A warning occurred. + */ + public function addWarning(Test $test, Warning $e, float $time): void + { + // + } + + /** + * A failure occurred. + */ + public function addFailure(Test $test, AssertionFailedError $e, float $time): void + { + // + } + + /** + * Incomplete test. + */ + public function addIncompleteTest(Test $test, \Throwable $t, float $time): void + { + // + } + + /** + * Risky test. + */ + public function addRiskyTest(Test $test, \Throwable $t, float $time): void + { + // + } + + /** + * Skipped test. + */ + public function addSkippedTest(Test $test, \Throwable $t, float $time): void + { + // + } + + /** + * A test suite started. + */ + public function startTestSuite(TestSuite $suite): void + { + // + } + + /** + * A test suite ended. + */ + public function endTestSuite(TestSuite $suite): void { if ($suite->getName() !== 'Cachet Test Suite') { return; @@ -38,4 +93,20 @@ class TestListener extends PHPUnit_Framework_BaseTestListener unlink($file); } } + + /** + * A test started. + */ + public function startTest(Test $test): void + { + // + } + + /** + * A test ended. + */ + public function endTest(Test $test, float $time): void + { + // + } }