From d8bdb500fddf6771502104b8a5bf786a4c9b3eb1 Mon Sep 17 00:00:00 2001 From: Sebastian Feldmann Date: Fri, 7 Sep 2018 16:01:37 +0200 Subject: [PATCH] Prevent failing filter handling on 'Test' instances Make sure the 'processSuiteFilters' method is only called for 'TestSuite' objects not for 'Test' objects. To achieve this, the 'processSuiteFilters' method call got moved to an existing type check. Fix issue #3254 --- src/TextUI/TestRunner.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/TextUI/TestRunner.php b/src/TextUI/TestRunner.php index 17eeca5f3b7..f6719eca86d 100644 --- a/src/TextUI/TestRunner.php +++ b/src/TextUI/TestRunner.php @@ -190,8 +190,6 @@ public function doRun(Test $suite, array $arguments = [], $exit = true) $this->handleConfiguration($arguments); - $this->processSuiteFilters($suite, $arguments); - if (isset($arguments['bootstrap'])) { $GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap']; } @@ -540,6 +538,7 @@ public function doRun(Test $suite, array $arguments = [], $exit = true) $result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']); if ($suite instanceof TestSuite) { + $this->processSuiteFilters($suite, $arguments); $suite->setRunTestInSeparateProcess($arguments['processIsolation']); }