@@ -39,20 +39,20 @@ class AttributeDriverTest extends TestCase
39
39
*/
40
40
private $ reader ;
41
41
42
+ public static function doSetUpBeforeClass (): void
43
+ {
44
+ if (PHP_VERSION_ID < 80000 ) {
45
+ self ::markTestSkipped (sprintf ('"%s" is only supported on PHP 8 ' , AttributeDriver::class));
46
+ }
47
+ }
48
+
42
49
protected function doSetUp (): void
43
50
{
44
51
$ this ->driver = new AttributeDriver ();
45
52
}
46
53
47
- /**
48
- * @requires PHP 8
49
- */
50
54
public function testLoadMetadata ()
51
55
{
52
- if (PHP_VERSION_ID < 80000 ) {
53
- $ this ->markTestSkipped (sprintf ('"%s" is only supported on PHP 8 ' , AttributeDriver::class));
54
- }
55
-
56
56
$ obj = new Dummy3 ();
57
57
$ metadata = $ this ->driver ->loadMetadataFromObject ($ obj );
58
58
@@ -61,30 +61,16 @@ public function testLoadMetadata()
61
61
$ this ->assertInstanceOf ('ReflectionProperty ' , $ metadata ->longitudeProperty );
62
62
}
63
63
64
- /**
65
- * @requires PHP 8
66
- */
67
64
public function testLoadMetadataFromWrongObject ()
68
65
{
69
- if (PHP_VERSION_ID < 80000 ) {
70
- $ this ->markTestSkipped (sprintf ('"%s" is only supported on PHP 8 ' , AttributeDriver::class));
71
- }
72
-
73
66
$ this ->expectException (MappingException::class);
74
67
$ this ->expectExceptionMessage ('The class ' .Dummy4::class.' is not geocodeable ' );
75
68
76
69
$ this ->driver ->loadMetadataFromObject (new Dummy4 ());
77
70
}
78
71
79
- /**
80
- * @requires PHP 8
81
- */
82
72
public function testIsGeocodable ()
83
73
{
84
- if (PHP_VERSION_ID < 80000 ) {
85
- $ this ->markTestSkipped (sprintf ('"%s" is only supported on PHP 8 ' , AttributeDriver::class));
86
- }
87
-
88
74
$ this ->assertTrue ($ this ->driver ->isGeocodeable (new Dummy3 ()));
89
75
}
90
76
}
0 commit comments