Fix TestListener
This commit is contained in:
@@ -11,24 +11,79 @@
|
|||||||
|
|
||||||
namespace CachetHQ\Tests\Cachet;
|
namespace CachetHQ\Tests\Cachet;
|
||||||
|
|
||||||
use PHPUnit_Framework_BaseTestListener;
|
use PHPUnit\Framework\AssertionFailedError;
|
||||||
use PHPUnit_Framework_TestSuite;
|
use PHPUnit\Framework\Test;
|
||||||
|
use PHPUnit\Framework\TestListener as PHPUnitTestListener;
|
||||||
|
use PHPUnit\Framework\TestSuite;
|
||||||
|
use PHPUnit\Framework\Warning;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the test listener class.
|
* This is the test listener class.
|
||||||
*
|
*
|
||||||
* @author Connor S. Parks <connor@connorvg.tv>
|
* @author Connor S. Parks <connor@connorvg.tv>
|
||||||
*/
|
*/
|
||||||
class TestListener extends PHPUnit_Framework_BaseTestListener
|
class TestListener implements PHPUnitTestListener
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A test suite ended.
|
* An error occurred.
|
||||||
*
|
|
||||||
* @param \PHPUnit_Framework_TestSuite $suite
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
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') {
|
if ($suite->getName() !== 'Cachet Test Suite') {
|
||||||
return;
|
return;
|
||||||
@@ -38,4 +93,20 @@ class TestListener extends PHPUnit_Framework_BaseTestListener
|
|||||||
unlink($file);
|
unlink($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A test started.
|
||||||
|
*/
|
||||||
|
public function startTest(Test $test): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A test ended.
|
||||||
|
*/
|
||||||
|
public function endTest(Test $test, float $time): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user