Skip to content

Commit bfa28dd

Browse files
committed
Make tests green
1 parent 7e611a0 commit bfa28dd

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

tests/PHPStan/Reflection/ConstantToFunctionParameterMapTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use function implode;
1212
use function sprintf;
1313
use function str_contains;
14+
use const PHP_VERSION_ID;
1415

1516
#[RequiresPhp('>= 8.0')]
1617
class ConstantToFunctionParameterMapTest extends PHPStanTestCase
@@ -105,6 +106,9 @@ public function testMapIsValid(): void
105106
);
106107
} else {
107108
$this->assertNotSame('', $constantName);
109+
if ($constantName === 'FILEINFO_APPLE' && PHP_VERSION_ID < 80200) {
110+
continue;
111+
}
108112
// Global constant
109113
$constantNameNode = new Name($constantName);
110114
$this->assertTrue(

tests/PHPStan/Reflection/ParameterAllowedConstantsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use PhpParser\Node\Name;
66
use PHPStan\Testing\PHPStanTestCase;
7+
use PHPUnit\Framework\Attributes\RequiresPhp;
78

9+
#[RequiresPhp('>= 8.0')]
810
class ParameterAllowedConstantsTest extends PHPStanTestCase
911
{
1012

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,7 @@ public function testBenevolentSuperglobalKeys(): void
15861586
$this->analyse([__DIR__ . '/data/benevolent-superglobal-keys.php'], []);
15871587
}
15881588

1589+
#[RequiresPhp('>= 8.0')]
15891590
public function testFileParams(): void
15901591
{
15911592
$this->analyse([__DIR__ . '/data/file.php'], [
@@ -1600,6 +1601,7 @@ public function testFileParams(): void
16001601
]);
16011602
}
16021603

1604+
#[RequiresPhp('>= 8.0')]
16031605
public function testFlockParams(): void
16041606
{
16051607
$this->analyse([__DIR__ . '/data/flock.php'], [

0 commit comments

Comments
 (0)