mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
4.x - skip Stringable test if not in PHP 8.0
This commit is contained in:
parent
5c2591f7b0
commit
7cf6495461
@ -147,7 +147,7 @@ class ToStringTest extends TestCase
|
||||
echo $a;
|
||||
}'
|
||||
],
|
||||
'stringableInterface' => [
|
||||
'PHP80-stringableInterface' => [
|
||||
'<?php
|
||||
interface Foo extends Stringable {}
|
||||
|
||||
|
@ -39,6 +39,12 @@ trait InvalidCodeAnalysisTestTrait
|
||||
if (version_compare(PHP_VERSION, '7.1.0', '<')) {
|
||||
$this->markTestSkipped('Test case requires PHP 7.1.');
|
||||
|
||||
return;
|
||||
}
|
||||
} elseif (strpos($test_name, 'PHP80-') !== false) {
|
||||
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
|
||||
$this->markTestSkipped('Test case requires PHP 8.0.');
|
||||
|
||||
return;
|
||||
}
|
||||
} elseif (strpos($test_name, 'SKIPPED-') !== false) {
|
||||
|
@ -45,6 +45,12 @@ trait ValidCodeAnalysisTestTrait
|
||||
if (version_compare(PHP_VERSION, '7.1.0', '<')) {
|
||||
$this->markTestSkipped('Test case requires PHP 7.1.');
|
||||
|
||||
return;
|
||||
}
|
||||
} elseif (strpos($test_name, 'PHP80-') !== false) {
|
||||
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
|
||||
$this->markTestSkipped('Test case requires PHP 8.0.');
|
||||
|
||||
return;
|
||||
}
|
||||
} elseif (strpos($test_name, 'SKIPPED-') !== false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user