Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Feb 5, 2022
1 parent b63c0aa commit 30798b5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/PHPStan/Analyser/NodeScopeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,12 @@ public function dataFileAsserts(): iterable
if (PHP_VERSION_ID >= 70400) {
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Comparison/data/bug-6473.php');
}

if (PHP_VERSION_ID >= 80000) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6566-types.php');
}

yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6500.php');
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6566-types.php');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/data/bug-6566-types.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php // lint >= 8.0

namespace Bug6566Types;

Expand Down
3 changes: 3 additions & 0 deletions tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ public function testBug6385(): void

public function testBug6566(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.0.');
}
$this->checkThisOnly = false;
$this->checkUnionTypes = true;
$this->analyse([__DIR__ . '/data/bug-6566.php'], []);
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/Rules/Properties/data/bug-6566.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php // lint >= 8.0

namespace Bug6566;

Expand Down

0 comments on commit 30798b5

Please sign in to comment.