Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 24, 2024
1 parent bfe1457 commit 6580c54
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/PHPStan/Rules/Classes/InstantiationRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ public function testBug4056(): void

public function testNamedArguments(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.x');
}

$this->analyse([__DIR__ . '/data/instantiation-named-arguments.php'], [
[
'Missing parameter $j (int) in call to InstantiationNamedArguments\Foo constructor.',
Expand Down
4 changes: 4 additions & 0 deletions tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ public function testRule(): void

public function testNamedArguments(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.x');
}

$this->analyse([__DIR__ . '/data/callables-named-arguments.php'], [
[
'Missing parameter $j (int) in call to closure.',
Expand Down
8 changes: 8 additions & 0 deletions tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,10 @@ public function testDisallowNamedArgumentsInPhpVersionScope(): void

public function testNamedArguments(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.x');
}

$this->checkThisOnly = false;
$this->checkNullables = true;
$this->checkUnionTypes = true;
Expand Down Expand Up @@ -2111,6 +2115,10 @@ public function testBug3546(): void

public function testBug4800(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.x');
}

$this->checkThisOnly = false;
$this->checkNullables = true;
$this->checkUnionTypes = true;
Expand Down
4 changes: 4 additions & 0 deletions tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ public function testBug2164(): void

public function testNamedArguments(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.x');
}

$this->checkThisOnly = false;

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

0 comments on commit 6580c54

Please sign in to comment.