Skip to content

Commit 43aed2c

Browse files
committed
Fix tests
1 parent 7b668ec commit 43aed2c

8 files changed

+12
-1
lines changed

tests/PHPStan/Rules/Comparison/DoWhileLoopConstantConditionRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PHPStan\Rules\Rule;
66
use PHPStan\Testing\CompositeRule;
77
use PHPStan\Testing\RuleTestCase;
8+
use PHPUnit\Framework\Attributes\RequiresPhp;
89

910
/**
1011
* @extends RuleTestCase<CompositeRule>
@@ -82,6 +83,7 @@ public function testRule(): void
8283
]);
8384
}
8485

86+
#[RequiresPhp('>= 8.2')]
8587
public function testInTrait(): void
8688
{
8789
$this->analyse([__DIR__ . '/data/do-while-in-trait.php'], [

tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ public function testBug6947(): void
158158
]);
159159
}
160160

161+
#[RequiresPhp('>= 8.2')]
161162
public function testInTrait(): void
162163
{
163164
$this->treatPhpDocTypesAsCertain = true;

tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,7 @@ public function testBug7599(): void
11661166
$this->analyse([__DIR__ . '/data/bug-7599.php'], []);
11671167
}
11681168

1169+
#[RequiresPhp('>= 8.0')]
11691170
public function testBug13474(): void
11701171
{
11711172
$this->treatPhpDocTypesAsCertain = true;

tests/PHPStan/Rules/Comparison/LogicalXorConstantConditionRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PHPStan\Rules\Rule as TRule;
66
use PHPStan\Testing\CompositeRule;
77
use PHPStan\Testing\RuleTestCase;
8+
use PHPUnit\Framework\Attributes\RequiresPhp;
89

910
/**
1011
* @extends RuleTestCase<CompositeRule>
@@ -77,6 +78,7 @@ public function testRule(): void
7778
]);
7879
}
7980

81+
#[RequiresPhp('>= 8.2')]
8082
public function testInTrait(): void
8183
{
8284
$this->analyse([__DIR__ . '/data/logical-xor-in-trait.php'], [

tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,7 @@ public function testBug8060(): void
10461046
$this->analyse([__DIR__ . '/data/bug-8060.php'], []);
10471047
}
10481048

1049+
#[RequiresPhp('>= 8.2')]
10491050
public function testBug9515(): void
10501051
{
10511052
$this->analyse([__DIR__ . '/data/bug-9515.php'], []);

tests/PHPStan/Rules/Comparison/TernaryOperatorConstantConditionRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PHPStan\Rules\Rule;
66
use PHPStan\Testing\CompositeRule;
77
use PHPStan\Testing\RuleTestCase;
8+
use PHPUnit\Framework\Attributes\RequiresPhp;
89

910
/**
1011
* @extends RuleTestCase<CompositeRule>
@@ -106,6 +107,7 @@ public function testBug7580(): void
106107
$this->analyse([__DIR__ . '/data/bug-7580.php'], []);
107108
}
108109

110+
#[RequiresPhp('>= 8.1')]
109111
public function testBug11949(): void
110112
{
111113
$this->treatPhpDocTypesAsCertain = true;

tests/PHPStan/Rules/Comparison/WhileLoopAlwaysFalseConditionRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PHPStan\Rules\Rule;
66
use PHPStan\Testing\CompositeRule;
77
use PHPStan\Testing\RuleTestCase;
8+
use PHPUnit\Framework\Attributes\RequiresPhp;
89

910
/**
1011
* @extends RuleTestCase<CompositeRule>
@@ -50,6 +51,7 @@ public function testRule(): void
5051
]);
5152
}
5253

54+
#[RequiresPhp('>= 8.2')]
5355
public function testInTrait(): void
5456
{
5557
$this->analyse([__DIR__ . '/data/while-false-in-trait.php'], [

tests/PHPStan/Rules/Comparison/data/bug-11949.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.1
22

33
namespace Bug11949;
44

0 commit comments

Comments
 (0)