Skip to content

Commit

Permalink
Merge branch '8.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 7, 2019
2 parents 77d2c9b + 4713ace commit c58638b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Framework/DataProviderTestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public function setDependencies(array $dependencies): void
$this->dependencies = $dependencies;

foreach ($this->tests as $test) {
if (!$test instanceof TestCase) {
continue;
}

$test->setDependencies($dependencies);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TestSuite implements \IteratorAggregate, SelfDescribing, Test
/**
* The tests in the test suite.
*
* @var TestCase[]
* @var Test[]
*/
protected $tests = [];

Expand Down
5 changes: 4 additions & 1 deletion src/Runner/TestSuiteSorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ private function sort(TestSuite $suite, int $order, bool $resolveDependencies, i
}

if ($resolveDependencies && !($suite instanceof DataProviderTestSuite) && $this->suiteOnlyContainsTests($suite)) {
$suite->setTests($this->resolveDependencies($suite->tests()));
/** @var TestCase[] $tests */
$tests = $suite->tests();

$suite->setTests($this->resolveDependencies($tests));
}
}

Expand Down

0 comments on commit c58638b

Please sign in to comment.