Skip to content

Commit 8b43cfa

Browse files
committed
Skip more mixed tests
1 parent e0ee68d commit 8b43cfa

17 files changed

+136
-14
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,10 @@ public function testBug7094(): void
827827

828828
public function testOffsetAccess(): void
829829
{
830+
if (PHP_VERSION_ID < 80000) {
831+
self::markTestSkipped('Test requires PHP 8.0.');
832+
}
833+
830834
$errors = $this->runAnalyse(__DIR__ . '/nsrt/offset-access.php');
831835
$this->assertCount(1, $errors);
832836
$this->assertSame('PHPDoc tag @return contains unresolvable type.', $errors[0]->getMessage());
@@ -1063,6 +1067,10 @@ public function testBug8376(): void
10631067

10641068
public function testAssertDocblock(): void
10651069
{
1070+
if (PHP_VERSION_ID < 80000) {
1071+
self::markTestSkipped('Test requires PHP 8.0.');
1072+
}
1073+
10661074
$errors = $this->runAnalyse(__DIR__ . '/nsrt/assert-docblock.php');
10671075
$this->assertCount(4, $errors);
10681076
$this->assertSame('Call to method AssertDocblock\A::testInt() with string will always evaluate to false.', $errors[0]->getMessage());
@@ -1396,6 +1404,10 @@ public function testBug11147(): void
13961404

13971405
public function testBug11283(): void
13981406
{
1407+
if (PHP_VERSION_ID < 80000) {
1408+
self::markTestSkipped('Test requires PHP 8.0.');
1409+
}
1410+
13991411
$errors = $this->runAnalyse(__DIR__ . '/data/bug-11283.php');
14001412
$this->assertNoErrors($errors);
14011413
}

tests/PHPStan/Analyser/NodeScopeResolverTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ public function dataFileAsserts(): iterable
152152
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Properties/data/bug-7839.php');
153153
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Classes/data/bug-5333.php');
154154
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Methods/data/bug-8174.php');
155-
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Comparison/data/bug-8169.php');
155+
156+
if (PHP_VERSION_ID >= 80000) {
157+
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Comparison/data/bug-8169.php');
158+
}
156159
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Functions/data/bug-8280.php');
157160
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Comparison/data/bug-8277.php');
158161
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Variables/data/bug-8113.php');

tests/PHPStan/Analyser/nsrt/bug-10131.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.0
22

33
namespace Bug10131;
44

tests/PHPStan/Analyser/nsrt/bug-7607.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types = 1);
1+
<?php // lint >= 8.0
2+
3+
declare(strict_types = 1);
24

35
namespace Bug7607;
46

tests/PHPStan/Analyser/nsrt/bug-7685.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.0
22

33
namespace bug7685;
44

tests/PHPStan/Analyser/nsrt/bug-9105.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.0
22

33
namespace Bug9105;
44

tests/PHPStan/Analyser/nsrt/falsey-isset-certainty.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.0
22

33
namespace FalseyIssetCertainty;
44

tests/PHPStan/Analyser/nsrt/falsey-ternary-certainty.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.0
22

33
namespace FalseyTernaryCertainty;
44

tests/PHPStan/Analyser/nsrt/in_array_loose.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.0
22

33
namespace InArrayLoose;
44

tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ public function testBug8169(): void
208208
$this->analyse([__DIR__ . '/data/bug-8169.php'], [
209209
[
210210
'Call to method Bug8169\HelloWorld::assertString() with string will always evaluate to true.',
211-
19,
211+
21,
212212
],
213213
[
214214
'Call to method Bug8169\HelloWorld::assertString() with string will always evaluate to true.',
215-
26,
215+
28,
216216
],
217217
[
218218
'Call to method Bug8169\HelloWorld::assertString() with int will always evaluate to false.',
219-
33,
219+
35,
220220
],
221221
]);
222222
}

0 commit comments

Comments
 (0)