@@ -92,31 +92,31 @@ function (string $property, ?DataIterableAnnotation $expected) {
92
92
$ annotations = app (DataIterableAnnotationReader::class)->getForClass (new ReflectionClass (CollectionDataAnnotationsData::class));
93
93
94
94
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 ' ),
102
102
]);
103
103
});
104
104
105
105
it ('can get data class for a data collection by method annotation ' , function () {
106
106
$ annotations = app (DataIterableAnnotationReader::class)->getForMethod (new ReflectionMethod (CollectionDataAnnotationsData::class, 'method ' ));
107
107
108
108
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 ' ),
120
120
]);
121
121
});
122
122
@@ -203,28 +203,28 @@ function (string $property, ?DataIterableAnnotation $expected) {
203
203
$ annotations = app (DataIterableAnnotationReader::class)->getForClass (new ReflectionClass (CollectionNonDataAnnotationsData::class));
204
204
205
205
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 ' ),
210
210
]);
211
211
});
212
212
213
213
it ('can get iterable class for a data by method annotation ' , function () {
214
214
$ annotations = app (DataIterableAnnotationReader::class)->getForMethod (new ReflectionMethod (CollectionNonDataAnnotationsData::class, 'method ' ));
215
215
216
216
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 ' ),
228
228
]);
229
229
});
230
230
0 commit comments