Skip to content

Commit

Permalink
Fix time-sensitive tests that use data providers
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfalque committed Nov 16, 2016
1 parent 9b9f1be commit f376cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $ti
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));
Expand All @@ -146,7 +146,7 @@ public function startTest(\PHPUnit_Framework_Test $test)
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);
Expand Down

0 comments on commit f376cde

Please sign in to comment.