Fix TestListener

This commit is contained in:
James Brooks
2018-06-17 00:44:50 +01:00
parent 3f4c423005
commit cf771097ea

View File

@@ -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 <connor@connorvg.tv>
*/
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
{
//
}
}