Fix time-sensitive tests that use data providers
This commit is contained in:
parent
9b9f1be117
commit
f376cdeb0a
@ -134,7 +134,7 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
|
||||
public function startTest(\PHPUnit_Framework_Test $test)
|
||||
{
|
||||
if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) {
|
||||
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName());
|
||||
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false));
|
||||
|
||||
if (in_array('time-sensitive', $groups, true)) {
|
||||
ClockMock::register(get_class($test));
|
||||
@ -146,7 +146,7 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
|
||||
public function endTest(\PHPUnit_Framework_Test $test, $time)
|
||||
{
|
||||
if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) {
|
||||
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName());
|
||||
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false));
|
||||
|
||||
if (in_array('time-sensitive', $groups, true)) {
|
||||
ClockMock::withClockMock(false);
|
||||
|
Reference in New Issue
Block a user