Skip to content

Commit 64fe302

Browse files
Fix tests on 8.4
1 parent 896cf60 commit 64fe302

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

tests/Support/Annotations/DataIterableAnnotationReaderTest.php

+33-33
Original file line numberDiff line numberDiff line change
@@ -92,31 +92,31 @@ function (string $property, ?DataIterableAnnotation $expected) {
9292
$annotations = app(DataIterableAnnotationReader::class)->getForClass(new ReflectionClass(CollectionDataAnnotationsData::class));
9393

9494
expect($annotations)->toEqualCanonicalizing([
95-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyN'),
96-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyO'),
97-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyP'),
98-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyQ'),
99-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyR'),
100-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyS'),
101-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyT'),
95+
'propertyN' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyN'),
96+
'propertyO' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyO'),
97+
'propertyP' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyP'),
98+
'propertyQ' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyQ'),
99+
'propertyR' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyR'),
100+
'propertyS' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyS'),
101+
'propertyT' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'propertyT'),
102102
]);
103103
});
104104

105105
it('can get data class for a data collection by method annotation', function () {
106106
$annotations = app(DataIterableAnnotationReader::class)->getForMethod(new ReflectionMethod(CollectionDataAnnotationsData::class, 'method'));
107107

108108
expect($annotations)->toEqualCanonicalizing([
109-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramA'),
110-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramB'),
111-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramC'),
112-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramD'),
113-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramE'),
114-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramF'),
115-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramG'),
116-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramH'),
117-
new DataIterableAnnotation(SimpleData::class, isData: true, keyType: 'int', property: 'paramJ'),
118-
new DataIterableAnnotation(SimpleData::class, isData: true, keyType: 'int', property: 'paramI'),
119-
new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramK'),
109+
'paramA' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramA'),
110+
'paramB' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramB'),
111+
'paramC' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramC'),
112+
'paramD' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramD'),
113+
'paramE' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramE'),
114+
'paramF' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramF'),
115+
'paramG' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramG'),
116+
'paramH' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramH'),
117+
'paramJ' => new DataIterableAnnotation(SimpleData::class, isData: true, keyType: 'int', property: 'paramJ'),
118+
'paramI' => new DataIterableAnnotation(SimpleData::class, isData: true, keyType: 'int', property: 'paramI'),
119+
'paramK' => new DataIterableAnnotation(SimpleData::class, isData: true, property: 'paramK'),
120120
]);
121121
});
122122

@@ -203,28 +203,28 @@ function (string $property, ?DataIterableAnnotation $expected) {
203203
$annotations = app(DataIterableAnnotationReader::class)->getForClass(new ReflectionClass(CollectionNonDataAnnotationsData::class));
204204

205205
expect($annotations)->toEqualCanonicalizing([
206-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyM'),
207-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyN'),
208-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyO'),
209-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyQ'),
206+
'propertyM' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyM'),
207+
'propertyN' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyN'),
208+
'propertyO' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyO'),
209+
'propertyQ' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'propertyQ'),
210210
]);
211211
});
212212

213213
it('can get iterable class for a data by method annotation', function () {
214214
$annotations = app(DataIterableAnnotationReader::class)->getForMethod(new ReflectionMethod(CollectionNonDataAnnotationsData::class, 'method'));
215215

216216
expect($annotations)->toEqualCanonicalizing([
217-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramA'),
218-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramB'),
219-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramC'),
220-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramD'),
221-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramE'),
222-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramF'),
223-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramG'),
224-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramH'),
225-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, keyType: 'int', property: 'paramJ'),
226-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, keyType: 'int', property: 'paramI'),
227-
new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramK'),
217+
'paramA' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramA'),
218+
'paramB' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramB'),
219+
'paramC' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramC'),
220+
'paramD' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramD'),
221+
'paramE' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramE'),
222+
'paramF' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramF'),
223+
'paramG' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramG'),
224+
'paramH' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramH'),
225+
'paramJ' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, keyType: 'int', property: 'paramJ'),
226+
'paramI' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, keyType: 'int', property: 'paramI'),
227+
'paramK' => new DataIterableAnnotation(DummyBackedEnum::class, isData: false, property: 'paramK'),
228228
]);
229229
});
230230

0 commit comments

Comments
 (0)