Skip to content

Commit

Permalink
Corrected type declarations around `PHPUnit\Framework\TestCase#(get|s…
Browse files Browse the repository at this point in the history
…et)Tests` parameters

These were supposed to be `TestCase` rather than more generic `Test` instances.
  • Loading branch information
Ocramius authored and sebastianbergmann committed Sep 7, 2019
1 parent cf1e222 commit 74f1bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ public function testAt(int $index)
/**
* Returns the tests as an enumeration.
*
* @return Test[]
* @return TestCase[]
*/
public function tests(): array
{
Expand All @@ -627,7 +627,7 @@ public function tests(): array
/**
* Set tests of the test suite
*
* @param Test[] $tests
* @param TestCase[] $tests
*/
public function setTests(array $tests): void
{
Expand Down
4 changes: 4 additions & 0 deletions src/Runner/TestSuiteSorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ private function cmpSize(Test $a, Test $b): int
* @param array<DataProviderTestSuite|TestCase> $tests
*
* @return array<DataProviderTestSuite|TestCase>
*
* @psalm-template T of array<DataProviderTestSuite|TestCase>
* @psalm-param T $tests
* @psalm-return T
*/
private function resolveDependencies(array $tests): array
{
Expand Down

0 comments on commit 74f1bc4

Please sign in to comment.