1818use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
1919use Symfony \Component \PropertyAccess \PropertyAccess ;
2020
21- class POPO
21+ class POPO3
2222{
2323 public $ id = 123 ;
2424 public $ name = 'someName ' ;
@@ -183,18 +183,18 @@ public function testTransformerDispatches()
183183 );
184184
185185 $ transformer = $ this ->getTransformer ($ dispatcher );
186- $ transformer ->transform (new POPO (), []);
186+ $ transformer ->transform (new POPO3 (), []);
187187 }
188188
189189 public function testPropertyPath ()
190190 {
191191 $ transformer = $ this ->getTransformer ();
192192
193- $ document = $ transformer ->transform (new POPO (), ['name ' => ['property_path ' => false ]]);
193+ $ document = $ transformer ->transform (new POPO3 (), ['name ' => ['property_path ' => false ]]);
194194 $ this ->assertInstanceOf (Document::class, $ document );
195195 $ this ->assertFalse ($ document ->has ('name ' ));
196196
197- $ document = $ transformer ->transform (new POPO (), ['realName ' => ['property_path ' => 'name ' ]]);
197+ $ document = $ transformer ->transform (new POPO3 (), ['realName ' => ['property_path ' => 'name ' ]]);
198198 $ this ->assertInstanceOf (Document::class, $ document );
199199 $ this ->assertTrue ($ document ->has ('realName ' ));
200200 $ this ->assertSame ('someName ' , $ document ->get ('realName ' ));
@@ -203,7 +203,7 @@ public function testPropertyPath()
203203 public function testThatCanTransformObject ()
204204 {
205205 $ transformer = $ this ->getTransformer ();
206- $ document = $ transformer ->transform (new POPO (), ['name ' => []]);
206+ $ document = $ transformer ->transform (new POPO3 (), ['name ' => []]);
207207 $ data = $ document ->getData ();
208208
209209 $ this ->assertInstanceOf (Document::class, $ document );
@@ -215,7 +215,7 @@ public function testThatCanTransformObjectWithCorrectTypes()
215215 {
216216 $ transformer = $ this ->getTransformer ();
217217 $ document = $ transformer ->transform (
218- new POPO (), [
218+ new POPO3 (), [
219219 'name ' => [],
220220 'float ' => [],
221221 'bool ' => [],
@@ -238,7 +238,7 @@ public function testThatCanTransformObjectWithCorrectTypes()
238238 public function testThatCanTransformObjectWithIteratorValue ()
239239 {
240240 $ transformer = $ this ->getTransformer ();
241- $ document = $ transformer ->transform (new POPO (), ['iterator ' => []]);
241+ $ document = $ transformer ->transform (new POPO3 (), ['iterator ' => []]);
242242 $ data = $ document ->getData ();
243243
244244 $ this ->assertSame (['value1 ' ], $ data ['iterator ' ]);
@@ -247,7 +247,7 @@ public function testThatCanTransformObjectWithIteratorValue()
247247 public function testThatCanTransformObjectWithArrayValue ()
248248 {
249249 $ transformer = $ this ->getTransformer ();
250- $ document = $ transformer ->transform (new POPO (), ['array ' => []]);
250+ $ document = $ transformer ->transform (new POPO3 (), ['array ' => []]);
251251 $ data = $ document ->getData ();
252252
253253 $ this ->assertSame (
@@ -261,7 +261,7 @@ public function testThatCanTransformObjectWithArrayValue()
261261 public function testThatCanTransformObjectWithMultiDimensionalArrayValue ()
262262 {
263263 $ transformer = $ this ->getTransformer ();
264- $ document = $ transformer ->transform (new POPO (), ['multiArray ' => []]);
264+ $ document = $ transformer ->transform (new POPO3 (), ['multiArray ' => []]);
265265 $ data = $ document ->getData ();
266266
267267 $ expectedDate = new \DateTime ('1978-09-07 ' );
@@ -277,7 +277,7 @@ public function testThatCanTransformObjectWithMultiDimensionalArrayValue()
277277 public function testThatNullValuesAreNotFilteredOut ()
278278 {
279279 $ transformer = $ this ->getTransformer ();
280- $ document = $ transformer ->transform (new POPO (), ['nullValue ' => []]);
280+ $ document = $ transformer ->transform (new POPO3 (), ['nullValue ' => []]);
281281 $ data = $ document ->getData ();
282282
283283 $ this ->assertTrue (array_key_exists ('nullValue ' , $ data ));
@@ -289,13 +289,13 @@ public function testThatNullValuesAreNotFilteredOut()
289289 public function testThatCannotTransformObjectWhenGetterDoesNotExistForPrivateMethod ()
290290 {
291291 $ transformer = $ this ->getTransformer ();
292- $ transformer ->transform (new POPO (), ['desc ' => []]);
292+ $ transformer ->transform (new POPO3 (), ['desc ' => []]);
293293 }
294294
295295 public function testFileAddedForAttachmentMapping ()
296296 {
297297 $ transformer = $ this ->getTransformer ();
298- $ document = $ transformer ->transform (new POPO (), ['file ' => ['type ' => 'attachment ' ]]);
298+ $ document = $ transformer ->transform (new POPO3 (), ['file ' => ['type ' => 'attachment ' ]]);
299299 $ data = $ document ->getData ();
300300
301301 $ this ->assertSame (base64_encode (file_get_contents (__DIR__ .'/fixtures/attachment.odt ' )), $ data ['file ' ]);
@@ -304,7 +304,7 @@ public function testFileAddedForAttachmentMapping()
304304 public function testFileContentsAddedForAttachmentMapping ()
305305 {
306306 $ transformer = $ this ->getTransformer ();
307- $ document = $ transformer ->transform (new POPO (), ['fileContents ' => ['type ' => 'attachment ' ]]);
307+ $ document = $ transformer ->transform (new POPO3 (), ['fileContents ' => ['type ' => 'attachment ' ]]);
308308 $ data = $ document ->getData ();
309309
310310 $ this ->assertSame (
@@ -315,7 +315,7 @@ public function testFileContentsAddedForAttachmentMapping()
315315 public function testNestedMapping ()
316316 {
317317 $ transformer = $ this ->getTransformer ();
318- $ document = $ transformer ->transform (new POPO (), [
318+ $ document = $ transformer ->transform (new POPO3 (), [
319319 'sub ' => [
320320 'type ' => 'nested ' ,
321321 'properties ' => ['foo ' => []],
@@ -334,7 +334,7 @@ public function testNestedMapping()
334334 public function tesObjectMapping ()
335335 {
336336 $ transformer = $ this ->getTransformer ();
337- $ document = $ transformer ->transform (new POPO (), [
337+ $ document = $ transformer ->transform (new POPO3 (), [
338338 'sub ' => [
339339 'type ' => 'object ' ,
340340 'properties ' => ['bar ' ],
@@ -353,7 +353,7 @@ public function tesObjectMapping()
353353 public function testObjectDoesNotRequireProperties ()
354354 {
355355 $ transformer = $ this ->getTransformer ();
356- $ document = $ transformer ->transform (new POPO (), [
356+ $ document = $ transformer ->transform (new POPO3 (), [
357357 'obj ' => [
358358 'type ' => 'object ' ,
359359 ],
@@ -373,7 +373,7 @@ public function testObjectsMappingOfAtLeastOneAutoMappedObjectAndAtLeastOneManua
373373 {
374374 $ transformer = $ this ->getTransformer ();
375375 $ document = $ transformer ->transform (
376- new POPO (),
376+ new POPO3 (),
377377 [
378378 'obj ' => ['type ' => 'object ' , 'properties ' => []],
379379 'nestedObject ' => [
@@ -417,7 +417,7 @@ public function testObjectsMappingOfAtLeastOneAutoMappedObjectAndAtLeastOneManua
417417 public function testParentMapping ()
418418 {
419419 $ transformer = $ this ->getTransformer ();
420- $ document = $ transformer ->transform (new POPO (), [
420+ $ document = $ transformer ->transform (new POPO3 (), [
421421 '_parent ' => ['type ' => 'upper ' , 'property ' => 'upper ' , 'identifier ' => 'id ' ],
422422 ]);
423423
@@ -427,7 +427,7 @@ public function testParentMapping()
427427 public function testParentMappingWithCustomIdentifier ()
428428 {
429429 $ transformer = $ this ->getTransformer ();
430- $ document = $ transformer ->transform (new POPO (), [
430+ $ document = $ transformer ->transform (new POPO3 (), [
431431 '_parent ' => ['type ' => 'upper ' , 'property ' => 'upper ' , 'identifier ' => 'name ' ],
432432 ]);
433433
@@ -437,7 +437,7 @@ public function testParentMappingWithCustomIdentifier()
437437 public function testParentMappingWithNullProperty ()
438438 {
439439 $ transformer = $ this ->getTransformer ();
440- $ document = $ transformer ->transform (new POPO (), [
440+ $ document = $ transformer ->transform (new POPO3 (), [
441441 '_parent ' => ['type ' => 'upper ' , 'property ' => null , 'identifier ' => 'id ' ],
442442 ]);
443443
@@ -447,7 +447,7 @@ public function testParentMappingWithNullProperty()
447447 public function testParentMappingWithCustomProperty ()
448448 {
449449 $ transformer = $ this ->getTransformer ();
450- $ document = $ transformer ->transform (new POPO (), [
450+ $ document = $ transformer ->transform (new POPO3 (), [
451451 '_parent ' => ['type ' => 'upper ' , 'property ' => 'upperAlias ' , 'identifier ' => 'id ' ],
452452 ]);
453453
@@ -457,7 +457,7 @@ public function testParentMappingWithCustomProperty()
457457 public function testThatMappedObjectsDontNeedAnIdentifierField ()
458458 {
459459 $ transformer = $ this ->getTransformer ();
460- $ document = $ transformer ->transform (new POPO (), [
460+ $ document = $ transformer ->transform (new POPO3 (), [
461461 'objWithoutIdentifier ' => [
462462 'type ' => 'object ' ,
463463 'properties ' => [
@@ -479,7 +479,7 @@ public function testThatMappedObjectsDontNeedAnIdentifierField()
479479 public function testThatNestedObjectsDontNeedAnIdentifierField ()
480480 {
481481 $ transformer = $ this ->getTransformer ();
482- $ document = $ transformer ->transform (new POPO (), [
482+ $ document = $ transformer ->transform (new POPO3 (), [
483483 'subWithoutIdentifier ' => [
484484 'type ' => 'nested ' ,
485485 'properties ' => [
@@ -501,7 +501,7 @@ public function testThatNestedObjectsDontNeedAnIdentifierField()
501501 public function testNestedTransformHandlesSingleObjects ()
502502 {
503503 $ transformer = $ this ->getTransformer ();
504- $ document = $ transformer ->transform (new POPO (), [
504+ $ document = $ transformer ->transform (new POPO3 (), [
505505 'upper ' => [
506506 'type ' => 'nested ' ,
507507 'properties ' => ['name ' => null ],
@@ -515,7 +515,7 @@ public function testNestedTransformHandlesSingleObjects()
515515 public function testNestedTransformReturnsAnEmptyArrayForNullValues ()
516516 {
517517 $ transformer = $ this ->getTransformer ();
518- $ document = $ transformer ->transform (new POPO (), [
518+ $ document = $ transformer ->transform (new POPO3 (), [
519519 'nullValue ' => [
520520 'type ' => 'nested ' ,
521521 'properties ' => [
0 commit comments