From 3a3a250475b2a255ea4ff814f2cdc2200d113c4d Mon Sep 17 00:00:00 2001 From: Ewout Pieter den Ouden Date: Thu, 15 Nov 2018 21:10:32 +0100 Subject: [PATCH 1/2] Fix bug where nested TestSuites were no longer seen by the sorter --- src/Runner/TestSuiteSorter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Runner/TestSuiteSorter.php b/src/Runner/TestSuiteSorter.php index d000985fcfa..c5d36de6d0e 100644 --- a/src/Runner/TestSuiteSorter.php +++ b/src/Runner/TestSuiteSorter.php @@ -275,6 +275,10 @@ function ($test) { */ private function getNormalizedTestName($test): string { + if ($test instanceof TestSuite && !($test instanceof DataProviderTestSuite)) { + return $test->getName(); + } + if ($test instanceof PhptTestCase) { return $test->getName(); } From c0869f74e234d9ddac18b31579a3f7b3ebdbc4f6 Mon Sep 17 00:00:00 2001 From: Ewout Pieter den Ouden Date: Thu, 15 Nov 2018 21:12:18 +0100 Subject: [PATCH 2/2] Restore correct regression test for sorting dataprovider tests --- .../GitHub/3396/issue-3396-test.phpt | 64 +++++++++++-------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/tests/end-to-end/regression/GitHub/3396/issue-3396-test.phpt b/tests/end-to-end/regression/GitHub/3396/issue-3396-test.phpt index a28856966f5..4a08b4f8dd1 100644 --- a/tests/end-to-end/regression/GitHub/3396/issue-3396-test.phpt +++ b/tests/end-to-end/regression/GitHub/3396/issue-3396-test.phpt @@ -2,40 +2,54 @@ https://github.com/sebastianbergmann/phpunit/issues/3396 --FILE--