@@ -112,15 +112,17 @@ public function testNormalize()
112
112
$ dummy ->setName ('hello ' );
113
113
$ dummy ->setRelatedDummy ($ relatedDummy );
114
114
115
+ $ defaultOptions = ['enable_getter_setter_extraction ' => true ];
116
+
115
117
$ propertyNameCollection = new PropertyNameCollection (['name ' , 'relatedDummy ' ]);
116
118
$ propertyNameCollectionFactoryProphecy = $ this ->prophesize (PropertyNameCollectionFactoryInterface::class);
117
- $ propertyNameCollectionFactoryProphecy ->create (Dummy::class, [] )->willReturn ($ propertyNameCollection );
119
+ $ propertyNameCollectionFactoryProphecy ->create (Dummy::class, $ defaultOptions )->willReturn ($ propertyNameCollection );
118
120
119
121
$ propertyMetadataFactoryProphecy = $ this ->prophesize (PropertyMetadataFactoryInterface::class);
120
- $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'name ' , [] )->willReturn (
122
+ $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'name ' , $ defaultOptions )->willReturn (
121
123
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_STRING ), '' , true )
122
124
);
123
- $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy ' , [] )->willReturn (
125
+ $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy ' , $ defaultOptions )->willReturn (
124
126
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_OBJECT , false , RelatedDummy::class), '' , true , false , false )
125
127
);
126
128
@@ -179,15 +181,17 @@ public function testNormalizeWithoutCache()
179
181
$ dummy ->setName ('hello ' );
180
182
$ dummy ->setRelatedDummy ($ relatedDummy );
181
183
184
+ $ defaultOptions = ['enable_getter_setter_extraction ' => true ];
185
+
182
186
$ propertyNameCollection = new PropertyNameCollection (['name ' , 'relatedDummy ' ]);
183
187
$ propertyNameCollectionFactoryProphecy = $ this ->prophesize (PropertyNameCollectionFactoryInterface::class);
184
- $ propertyNameCollectionFactoryProphecy ->create (Dummy::class, [] )->willReturn ($ propertyNameCollection );
188
+ $ propertyNameCollectionFactoryProphecy ->create (Dummy::class, $ defaultOptions )->willReturn ($ propertyNameCollection );
185
189
186
190
$ propertyMetadataFactoryProphecy = $ this ->prophesize (PropertyMetadataFactoryInterface::class);
187
- $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'name ' , [] )->willReturn (
191
+ $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'name ' , $ defaultOptions )->willReturn (
188
192
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_STRING ), '' , true )
189
193
);
190
- $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy ' , [] )->willReturn (
194
+ $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy ' , $ defaultOptions )->willReturn (
191
195
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_OBJECT , false , RelatedDummy::class), '' , true , false , false )
192
196
);
193
197
@@ -261,18 +265,20 @@ public function testMaxDepth()
261
265
$ level3 ->name = 'level 3 ' ;
262
266
$ level2 ->child = $ level3 ;
263
267
268
+ $ defaultOptions = ['enable_getter_setter_extraction ' => true ];
269
+
264
270
$ propertyNameCollection = new PropertyNameCollection (['id ' , 'name ' , 'child ' ]);
265
271
$ propertyNameCollectionFactoryProphecy = $ this ->prophesize (PropertyNameCollectionFactoryInterface::class);
266
- $ propertyNameCollectionFactoryProphecy ->create (MaxDepthDummy::class, [] )->willReturn ($ propertyNameCollection );
272
+ $ propertyNameCollectionFactoryProphecy ->create (MaxDepthDummy::class, $ defaultOptions )->willReturn ($ propertyNameCollection );
267
273
268
274
$ propertyMetadataFactoryProphecy = $ this ->prophesize (PropertyMetadataFactoryInterface::class);
269
- $ propertyMetadataFactoryProphecy ->create (MaxDepthDummy::class, 'id ' , [] )->willReturn (
275
+ $ propertyMetadataFactoryProphecy ->create (MaxDepthDummy::class, 'id ' , $ defaultOptions )->willReturn (
270
276
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_INT ), '' , true )
271
277
);
272
- $ propertyMetadataFactoryProphecy ->create (MaxDepthDummy::class, 'name ' , [] )->willReturn (
278
+ $ propertyMetadataFactoryProphecy ->create (MaxDepthDummy::class, 'name ' , $ defaultOptions )->willReturn (
273
279
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_STRING ), '' , true )
274
280
);
275
- $ propertyMetadataFactoryProphecy ->create (MaxDepthDummy::class, 'child ' , [] )->willReturn (
281
+ $ propertyMetadataFactoryProphecy ->create (MaxDepthDummy::class, 'child ' , $ defaultOptions )->willReturn (
276
282
new PropertyMetadata (new Type (Type::BUILTIN_TYPE_OBJECT , false , MaxDepthDummy::class), '' , true , false , true )
277
283
);
278
284
0 commit comments