|
16 | 16 | use Symfony\Component\Form\Exception\AlreadySubmittedException; |
17 | 17 | use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; |
18 | 18 | use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; |
19 | | -use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; |
20 | 19 | use Symfony\Component\Form\Extension\Core\Type\DateType; |
21 | 20 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
22 | 21 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
@@ -1080,33 +1079,6 @@ public function testFileUpload() |
1080 | 1079 | $this->assertNull($this->form->get('bar')->getData()); |
1081 | 1080 | } |
1082 | 1081 |
|
1083 | | - /** |
1084 | | - * @group legacy |
1085 | | - */ |
1086 | | - public function testMapDateTimeObjectsWithEmptyArrayDataUsingPropertyPathMapper() |
1087 | | - { |
1088 | | - $propertyAccessor = PropertyAccess::createPropertyAccessorBuilder() |
1089 | | - ->enableExceptionOnInvalidIndex() |
1090 | | - ->getPropertyAccessor(); |
1091 | | - $form = $this->factory->createBuilder() |
1092 | | - ->setDataMapper(new PropertyPathMapper($propertyAccessor)) |
1093 | | - ->add('date', DateType::class, [ |
1094 | | - 'auto_initialize' => false, |
1095 | | - 'format' => 'dd/MM/yyyy', |
1096 | | - 'html5' => false, |
1097 | | - 'model_timezone' => 'UTC', |
1098 | | - 'view_timezone' => 'UTC', |
1099 | | - 'widget' => 'single_text', |
1100 | | - ]) |
1101 | | - ->getForm(); |
1102 | | - |
1103 | | - $form->submit([ |
1104 | | - 'date' => '04/08/2022', |
1105 | | - ]); |
1106 | | - |
1107 | | - $this->assertEquals(['date' => new \DateTime('2022-08-04', new \DateTimeZone('UTC'))], $form->getData()); |
1108 | | - } |
1109 | | - |
1110 | 1082 | public function testMapDateTimeObjectsWithEmptyArrayDataUsingDataMapper() |
1111 | 1083 | { |
1112 | 1084 | $propertyAccessor = PropertyAccess::createPropertyAccessorBuilder() |
|
0 commit comments