Skip to content

Commit c5df243

Browse files
committed
Fix test
1 parent fa95faf commit c5df243

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/PHPStan/Rules/Traits/TraitAttributesRuleTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\Traits;
44

5-
use PHPStan\Php\PhpVersion;
65
use PHPStan\Rules\AttributesCheck;
76
use PHPStan\Rules\ClassCaseSensitivityCheck;
87
use PHPStan\Rules\ClassForbiddenNameCheck;
@@ -35,7 +34,6 @@ protected function getRule(): Rule
3534
new FunctionCallParametersCheck(
3635
new RuleLevelHelper($reflectionProvider, true, false, true, $this->checkExplicitMixed, $this->checkImplicitMixed, false),
3736
new NullsafeCheck(),
38-
new PhpVersion(80000),
3937
new UnresolvableTypeHelper(),
4038
new PropertyReflectionFinder(),
4139
true,
@@ -54,6 +52,10 @@ protected function getRule(): Rule
5452

5553
public function testRule(): void
5654
{
55+
if (PHP_VERSION_ID < 80000) {
56+
$this->markTestSkipped('Test requires PHP 8.0.');
57+
}
58+
5759
$this->analyse([__DIR__ . '/data/trait-attributes.php'], [
5860
[
5961
'Attribute class TraitAttributes\AbstractAttribute is abstract.',
@@ -85,6 +87,10 @@ public function testBug12011(): void
8587

8688
public function testBug12281(): void
8789
{
90+
if (PHP_VERSION_ID < 80100) {
91+
$this->markTestSkipped('Test requires PHP 8.1.');
92+
}
93+
8894
$this->analyse([__DIR__ . '/data/bug-12281.php'], [
8995
[
9096
'Attribute class AllowDynamicProperties cannot be used with trait.',

0 commit comments

Comments
 (0)