mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 03:37:44 +08:00
Skip the tests when PHP_VERSION < 8
This commit is contained in:
parent
bd4eabcc89
commit
8872a5c658
@ -36,6 +36,9 @@ class AnnotationReaderTest extends TestCase
|
||||
|
||||
public function testGetNotFoundAttributesOfClass()
|
||||
{
|
||||
if (\PHP_VERSION_ID < 80000) {
|
||||
$this->markTestSkipped('The test only for PHP 8');
|
||||
}
|
||||
$reflectionClass = new ReflectionClass(NotFoundAttributeTarget::class);
|
||||
|
||||
$exceptionMessage = "No attribute class found for 'HyperfTest\\Di\\Stub\\NotExistAttribute' in HyperfTest\\Di\\Stub\\NotFoundAttributeTarget";
|
||||
@ -55,6 +58,9 @@ class AnnotationReaderTest extends TestCase
|
||||
|
||||
public function testGetNotFoundAttributesOfMethod()
|
||||
{
|
||||
if (\PHP_VERSION_ID < 80000) {
|
||||
$this->markTestSkipped('The test only for PHP 8');
|
||||
}
|
||||
$reflectionClass = new ReflectionClass(NotFoundAttributeTarget::class);
|
||||
$reflectionMethod = $reflectionClass->getMethod('foo');
|
||||
|
||||
@ -75,6 +81,9 @@ class AnnotationReaderTest extends TestCase
|
||||
|
||||
public function testGetNotFoundAttributesOfProperty()
|
||||
{
|
||||
if (\PHP_VERSION_ID < 80000) {
|
||||
$this->markTestSkipped('The test only for PHP 8');
|
||||
}
|
||||
$reflectionClass = new ReflectionClass(NotFoundAttributeTarget::class);
|
||||
$reflectionProperty = $reflectionClass->getProperty('foo');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user