diff --git a/Legacy/SymfonyTestsListenerTrait.php b/Legacy/SymfonyTestsListenerTrait.php index a623edb..cadd6dd 100644 --- a/Legacy/SymfonyTestsListenerTrait.php +++ b/Legacy/SymfonyTestsListenerTrait.php @@ -13,6 +13,7 @@ use Doctrine\Common\Annotations\AnnotationRegistry; use PHPUnit\Framework\AssertionFailedError; +use PHPUnit\Framework\DataProviderTestSuite; use PHPUnit\Framework\RiskyTestError; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; @@ -196,7 +197,13 @@ public function startTestSuite($suite) public function addSkippedTest($test, \Exception $e, $time) { if (0 < $this->state) { - $this->isSkipped[\get_class($test)][$test->getName()] = 1; + if ($test instanceof DataProviderTestSuite) { + foreach ($test->tests() as $testWithDataProvider) { + $this->isSkipped[\get_class($testWithDataProvider)][$testWithDataProvider->getName()] = 1; + } + } else { + $this->isSkipped[\get_class($test)][$test->getName()] = 1; + } } }