@@ -133,7 +133,10 @@ public function testDontValidateIfParentWithoutValidConstraint()
133
133
$ parent ->add ($ form );
134
134
135
135
$ form ->setData ($ object );
136
+ $ parent ->submit ([]);
136
137
138
+ $ this ->assertTrue ($ form ->isSubmitted ());
139
+ $ this ->assertTrue ($ form ->isSynchronized ());
137
140
$ this ->expectNoValidate ();
138
141
139
142
$ this ->validator ->validate ($ form , new Form ());
@@ -188,10 +191,15 @@ public function testDontValidateIfNoValidationGroups()
188
191
'validation_groups ' => [],
189
192
])
190
193
->setData ($ object )
194
+ ->setCompound (true )
195
+ ->setDataMapper (new PropertyPathMapper ())
191
196
->getForm ();
192
197
193
198
$ form ->setData ($ object );
199
+ $ form ->submit ([]);
194
200
201
+ $ this ->assertTrue ($ form ->isSubmitted ());
202
+ $ this ->assertTrue ($ form ->isSynchronized ());
195
203
$ this ->expectNoValidate ();
196
204
197
205
$ this ->validator ->validate ($ form , new Form ());
@@ -214,6 +222,8 @@ public function testDontValidateConstraintsIfNoValidationGroups()
214
222
// Launch transformer
215
223
$ form ->submit ('foo ' );
216
224
225
+ $ this ->assertTrue ($ form ->isSubmitted ());
226
+ $ this ->assertTrue ($ form ->isSynchronized ());
217
227
$ this ->expectNoValidate ();
218
228
219
229
$ this ->validator ->validate ($ form , new Form ());
@@ -236,6 +246,8 @@ public function testDontValidateChildConstraintsIfCallableNoValidationGroups()
236
246
$ form ->add ($ child );
237
247
$ form ->submit ([]);
238
248
249
+ $ this ->assertTrue ($ form ->isSubmitted ());
250
+ $ this ->assertTrue ($ form ->isSynchronized ());
239
251
$ this ->expectNoValidate ();
240
252
241
253
$ this ->validator ->validate ($ form , new Form ());
@@ -264,6 +276,8 @@ function () { throw new TransformationFailedException(); }
264
276
// Launch transformer
265
277
$ form ->submit ('foo ' );
266
278
279
+ $ this ->assertTrue ($ form ->isSubmitted ());
280
+ $ this ->assertFalse ($ form ->isSynchronized ());
267
281
$ this ->expectNoValidate ();
268
282
269
283
$ this ->validator ->validate ($ form , new Form ());
@@ -299,6 +313,8 @@ function () { throw new TransformationFailedException(); }
299
313
// Launch transformer
300
314
$ form ->submit ('foo ' );
301
315
316
+ $ this ->assertTrue ($ form ->isSubmitted ());
317
+ $ this ->assertFalse ($ form ->isSynchronized ());
302
318
$ this ->expectNoValidate ();
303
319
304
320
$ this ->validator ->validate ($ form , new Form ());
@@ -410,6 +426,8 @@ function () { throw new TransformationFailedException(); }
410
426
// Launch transformer
411
427
$ form ->submit (['child ' => 'foo ' ]);
412
428
429
+ $ this ->assertTrue ($ form ->isSubmitted ());
430
+ $ this ->assertFalse ($ form ->isSynchronized ());
413
431
$ this ->expectNoValidate ();
414
432
415
433
$ this ->validator ->validate ($ form , new Form ());
@@ -615,7 +633,10 @@ public function testDontWalkScalars()
615
633
$ form = $ this ->getBuilder ()
616
634
->setData ('scalar ' )
617
635
->getForm ();
636
+ $ form ->submit ('foo ' );
618
637
638
+ $ this ->assertTrue ($ form ->isSubmitted ());
639
+ $ this ->assertTrue ($ form ->isSynchronized ());
619
640
$ this ->expectNoValidate ();
620
641
621
642
$ this ->validator ->validate ($ form , new Form ());
@@ -633,6 +654,8 @@ public function testViolationIfExtraData()
633
654
634
655
$ form ->submit (['foo ' => 'bar ' ]);
635
656
657
+ $ this ->assertTrue ($ form ->isSubmitted ());
658
+ $ this ->assertTrue ($ form ->isSynchronized ());
636
659
$ this ->expectNoValidate ();
637
660
638
661
$ this ->validator ->validate ($ form , new Form ());
@@ -654,6 +677,8 @@ public function testViolationFormatIfMultipleExtraFields()
654
677
655
678
$ form ->submit (['foo ' => 'bar ' , 'baz ' => 'qux ' , 'quux ' => 'quuz ' ]);
656
679
680
+ $ this ->assertTrue ($ form ->isSubmitted ());
681
+ $ this ->assertTrue ($ form ->isSynchronized ());
657
682
$ this ->expectNoValidate ();
658
683
659
684
$ this ->validator ->validate ($ form , new Form ());
0 commit comments