Skip to content

Commit 64167eb

Browse files
thg2kondrejmirtes
authored andcommitted
Relax test version restriction
1 parent 8da7747 commit 64167eb

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,19 +1690,30 @@ public function testBug10974(): void
16901690
public function testCountArrayShift(): void
16911691
{
16921692
if (PHP_VERSION_ID < 80000) {
1693-
$this->markTestSkipped('Test requires PHP 8.0.');
1693+
$errors = [
1694+
[
1695+
'Parameter #1 $var of function count expects array|Countable, array|false given.',
1696+
8,
1697+
],
1698+
[
1699+
'Parameter #1 $var of function count expects array|Countable, array|false given.',
1700+
16,
1701+
],
1702+
];
1703+
} else {
1704+
$errors = [
1705+
[
1706+
'Parameter #1 $value of function count expects array|Countable, array|false given.',
1707+
8,
1708+
],
1709+
[
1710+
'Parameter #1 $value of function count expects array|Countable, array|false given.',
1711+
16,
1712+
],
1713+
];
16941714
}
16951715

1696-
$this->analyse([__DIR__ . '/data/count-array-shift.php'], [
1697-
[
1698-
'Parameter #1 $value of function count expects array|Countable, array|false given.',
1699-
8,
1700-
],
1701-
[
1702-
'Parameter #1 $value of function count expects array|Countable, array|false given.',
1703-
16,
1704-
],
1705-
]);
1716+
$this->analyse([__DIR__ . '/data/count-array-shift.php'], $errors);
17061717
}
17071718

17081719
}

0 commit comments

Comments
 (0)