Skip to content

Commit 6580c54

Browse files
committed
fix tests
1 parent bfe1457 commit 6580c54

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

tests/PHPStan/Rules/Classes/InstantiationRuleTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ public function testBug4056(): void
289289

290290
public function testNamedArguments(): void
291291
{
292+
if (PHP_VERSION_ID < 80000) {
293+
$this->markTestSkipped('Test requires PHP 8.x');
294+
}
295+
292296
$this->analyse([__DIR__ . '/data/instantiation-named-arguments.php'], [
293297
[
294298
'Missing parameter $j (int) in call to InstantiationNamedArguments\Foo constructor.',

tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ public function testRule(): void
156156

157157
public function testNamedArguments(): void
158158
{
159+
if (PHP_VERSION_ID < 80000) {
160+
$this->markTestSkipped('Test requires PHP 8.x');
161+
}
162+
159163
$this->analyse([__DIR__ . '/data/callables-named-arguments.php'], [
160164
[
161165
'Missing parameter $j (int) in call to closure.',

tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -1835,6 +1835,10 @@ public function testDisallowNamedArgumentsInPhpVersionScope(): void
18351835

18361836
public function testNamedArguments(): void
18371837
{
1838+
if (PHP_VERSION_ID < 80000) {
1839+
$this->markTestSkipped('Test requires PHP 8.x');
1840+
}
1841+
18381842
$this->checkThisOnly = false;
18391843
$this->checkNullables = true;
18401844
$this->checkUnionTypes = true;
@@ -2111,6 +2115,10 @@ public function testBug3546(): void
21112115

21122116
public function testBug4800(): void
21132117
{
2118+
if (PHP_VERSION_ID < 80000) {
2119+
$this->markTestSkipped('Test requires PHP 8.x');
2120+
}
2121+
21142122
$this->checkThisOnly = false;
21152123
$this->checkNullables = true;
21162124
$this->checkUnionTypes = true;

tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,10 @@ public function testBug2164(): void
410410

411411
public function testNamedArguments(): void
412412
{
413+
if (PHP_VERSION_ID < 80000) {
414+
$this->markTestSkipped('Test requires PHP 8.x');
415+
}
416+
413417
$this->checkThisOnly = false;
414418

415419
$this->analyse([__DIR__ . '/data/static-method-named-arguments.php'], [

0 commit comments

Comments
 (0)