@@ -94,13 +94,11 @@ public function testFieldConstraintsInvalidateFormIfFieldIsSubmitted()
94
94
95
95
public function testFieldsValidateInSequence ()
96
96
{
97
- $ allowEmptyString = property_exists (Length::class, 'allowEmptyString ' ) ? ['allowEmptyString ' => true ] : [];
98
-
99
97
$ form = $ this ->createForm (FormType::class, null , [
100
98
'validation_groups ' => new GroupSequence (['group1 ' , 'group2 ' ]),
101
99
])
102
100
->add ('foo ' , TextType::class, [
103
- 'constraints ' => [new Length (['min ' => 10 , 'groups ' => ['group1 ' ]] + $ allowEmptyString )],
101
+ 'constraints ' => [new Length (['min ' => 10 , 'groups ' => ['group1 ' ]])],
104
102
])
105
103
->add ('bar ' , TextType::class, [
106
104
'constraints ' => [new NotBlank (['groups ' => ['group2 ' ]])],
@@ -117,16 +115,14 @@ public function testFieldsValidateInSequence()
117
115
118
116
public function testFieldsValidateInSequenceWithNestedGroupsArray ()
119
117
{
120
- $ allowEmptyString = property_exists (Length::class, 'allowEmptyString ' ) ? ['allowEmptyString ' => true ] : [];
121
-
122
118
$ form = $ this ->createForm (FormType::class, null , [
123
119
'validation_groups ' => new GroupSequence ([['group1 ' , 'group2 ' ], 'group3 ' ]),
124
120
])
125
121
->add ('foo ' , TextType::class, [
126
- 'constraints ' => [new Length (['min ' => 10 , 'groups ' => ['group1 ' ]] + $ allowEmptyString )],
122
+ 'constraints ' => [new Length (['min ' => 10 , 'groups ' => ['group1 ' ]])],
127
123
])
128
124
->add ('bar ' , TextType::class, [
129
- 'constraints ' => [new Length (['min ' => 10 , 'groups ' => ['group2 ' ]] + $ allowEmptyString )],
125
+ 'constraints ' => [new Length (['min ' => 10 , 'groups ' => ['group2 ' ]])],
130
126
])
131
127
->add ('baz ' , TextType::class, [
132
128
'constraints ' => [new NotBlank (['groups ' => ['group3 ' ]])],
0 commit comments