|
41 | 41 | use Symfony\Component\Serializer\Tests\Fixtures\Php74Dummy;
|
42 | 42 | use Symfony\Component\Serializer\Tests\Fixtures\Php74DummyPrivate;
|
43 | 43 | use Symfony\Component\Serializer\Tests\Fixtures\Php80Dummy;
|
44 |
| -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodDummy; |
45 |
| -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodWithMethodSerializedNameDummy; |
46 |
| -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodWithPropertySerializedNameDummy; |
47 | 44 | use Symfony\Component\Serializer\Tests\Fixtures\SiblingHolder;
|
48 | 45 | use Symfony\Component\Serializer\Tests\Normalizer\Features\AttributesTestTrait;
|
49 | 46 | use Symfony\Component\Serializer\Tests\Normalizer\Features\CacheableObjectAttributesTestTrait;
|
@@ -874,53 +871,6 @@ public function testNormalizeStdClass()
|
874 | 871 | $this->assertSame(['baz' => 'baz'], $this->normalizer->normalize($o2));
|
875 | 872 | }
|
876 | 873 |
|
877 |
| - public function testSamePropertyAsMethod() |
878 |
| - { |
879 |
| - $object = new SamePropertyAsMethodDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); |
880 |
| - $expected = [ |
881 |
| - 'freeTrial' => 'free_trial', |
882 |
| - 'hasSubscribe' => 'has_subscribe', |
883 |
| - 'getReady' => 'get_ready', |
884 |
| - 'isActive' => 'is_active', |
885 |
| - ]; |
886 |
| - |
887 |
| - $this->assertSame($expected, $this->normalizer->normalize($object)); |
888 |
| - } |
889 |
| - |
890 |
| - public function testSamePropertyAsMethodWithPropertySerializedName() |
891 |
| - { |
8
A935
92 |
| - $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); |
893 |
| - $this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory)); |
894 |
| - $this->normalizer->setSerializer($this->serializer); |
895 |
| - |
896 |
| - $object = new SamePropertyAsMethodWithPropertySerializedNameDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); |
897 |
| - $expected = [ |
898 |
| - 'free_trial_property' => 'free_trial', |
899 |
| - 'has_subscribe_property' => 'has_subscribe', |
900 |
| - 'get_ready_property' => 'get_ready', |
901 |
| - 'is_active_property' => 'is_active', |
902 |
| - ]; |
903 |
| - |
904 |
| - $this->assertSame($expected, $this->normalizer->normalize($object)); |
905 |
| - } |
906 |
| - |
907 |
| - public function testSamePropertyAsMethodWithMethodSerializedName() |
908 |
| - { |
909 |
| - $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); |
910 |
| - $this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory)); |
911 |
| - $this->normalizer->setSerializer($this->serializer); |
912 |
| - |
913 |
| - $object = new SamePropertyAsMethodWithMethodSerializedNameDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); |
914 |
| - $expected = [ |
915 |
| - 'free_trial_method' => 'free_trial', |
916 |
| - 'has_subscribe_method' => 'has_subscribe', |
917 |
| - 'get_ready_method' => 'get_ready', |
918 |
| - 'is_active_method' => 'is_active', |
919 |
| - ]; |
920 |
| - |
921 |
| - $this->assertSame($expected, $this->normalizer->normalize($object)); |
922 |
| - } |
923 |
| - |
924 | 874 | public function testNormalizeWithIgnoreAnnotationAndPrivateProperties()
|
925 | 875 | {
|
926 | 876 | $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
|
|
0 commit comments