13
13
use Documents \CmsUser ;
14
14
use Generator ;
15
15
use PHPUnit \Framework \Attributes \DataProvider ;
16
+ use PHPUnit \Framework \Attributes \RequiresPhp ;
16
17
use stdClass ;
17
18
18
19
use function assert ;
@@ -92,18 +93,18 @@ public function testColumnWithMissingTypeDefaultsToString(): void
92
93
}
93
94
94
95
/** @group DDC-318 */
96
+ #[RequiresPhp('>= 8.4 ' )]
95
97
public function testGetAllClassNamesIsIdempotent (): void
96
98
{
97
99
$ annotationDriver = $ this ->loadDriverForCMSDocuments ();
98
100
$ original = $ annotationDriver ->getAllClassNames ();
99
-
100
- $ annotationDriver = $ this ->loadDriverForCMSDocuments ();
101
101
$ afterTestReset = $ annotationDriver ->getAllClassNames ();
102
102
103
103
self ::assertEquals ($ original , $ afterTestReset );
104
104
}
105
105
106
106
/** @group DDC-318 */
107
+ #[RequiresPhp('>= 8.4 ' )]
107
108
public function testGetAllClassNamesIsIdempotentEvenWithDifferentDriverInstances (): void
108
109
{
109
110
$ annotationDriver = $ this ->loadDriverForCMSDocuments ();
@@ -116,15 +117,18 @@ public function testGetAllClassNamesIsIdempotentEvenWithDifferentDriverInstances
116
117
}
117
118
118
119
/** @group DDC-318 */
120
+ #[RequiresPhp('>= 8.4 ' )]
119
121
public function testGetAllClassNamesReturnsAlreadyLoadedClassesIfAppropriate (): void
120
122
{
123
+ self ::assertTrue (class_exists (CmsUser::class), 'Pre-load the class ' );
121
124
$ annotationDriver = $ this ->loadDriverForCMSDocuments ();
122
125
$ classes = $ annotationDriver ->getAllClassNames ();
123
126
124
127
self ::assertContains (CmsUser::class, $ classes );
125
128
}
126
129
127
130
/** @group DDC-318 */
131
+ #[RequiresPhp('>= 8.4 ' )]
128
132
public function testGetClassNamesReturnsOnlyTheAppropriateClasses (): void
129
133
{
130
134
$ extraneousClassName = ColumnWithoutType::class;
0 commit comments