Skip to content

Commit

Permalink
Prevent failing filter handling on 'Test' instances
Browse files Browse the repository at this point in the history
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 sebastianbergmann#3254
  • Loading branch information
Sebastian Feldmann committed Sep 7, 2018
1 parent 6e8df6d commit 84b7535
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/TextUI/TestRunner.php
Expand Up @@ -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'];
}
Expand Down Expand Up @@ -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']);
}

Expand Down

0 comments on commit 84b7535

Please sign in to comment.