1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Specify required php version for test

This commit is contained in:
Bei Xiao 2022-02-22 23:41:53 +02:00
parent c9666bbeb5
commit 0b24b07423
2 changed files with 5 additions and 1 deletions

View File

@ -371,7 +371,7 @@ class EnumTest extends TestCase
[],
'8.1',
],
'InterfacesWithProperties' => [
'PHP81-InterfacesWithProperties' => [
'<?php
static fn (\UnitEnum $tag): string => $tag->name;

View File

@ -55,6 +55,10 @@ trait ValidCodeAnalysisTestTrait
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
$this->markTestSkipped('Test case requires PHP 8.0.');
}
} elseif (strpos($test_name, 'PHP81-') !== false) {
if (version_compare(PHP_VERSION, '8.1.0', '<')) {
$this->markTestSkipped('Test case requires PHP 8.1.');
}
} elseif (strpos($test_name, 'SKIPPED-') !== false) {
$this->markTestSkipped('Skipped due to a bug.');
}