@@ -133,7 +133,10 @@ public function testDontValidateIfParentWithoutValidConstraint()
133133 $ parent ->add ($ form );
134134
135135 $ form ->setData ($ object );
136+ $ parent ->submit ([]);
136137
138+ $ this ->assertTrue ($ form ->isSubmitted ());
139+ $ this ->assertTrue ($ form ->isSynchronized ());
137140 $ this ->expectNoValidate ();
138141
139142 $ this ->validator ->validate ($ form , new Form ());
@@ -188,10 +191,15 @@ public function testDontValidateIfNoValidationGroups()
188191 'validation_groups ' => [],
189192 ])
190193 ->setData ($ object )
194+ ->setCompound (true )
195+ ->setDataMapper (new PropertyPathMapper ())
191196 ->getForm ();
192197
193198 $ form ->setData ($ object );
199+ $ form ->submit ([]);
194200
201+ $ this ->assertTrue ($ form ->isSubmitted ());
202+ $ this ->assertTrue ($ form ->isSynchronized ());
195203 $ this ->expectNoValidate ();
196204
197205 $ this ->validator ->validate ($ form , new Form ());
@@ -214,6 +222,8 @@ public function testDontValidateConstraintsIfNoValidationGroups()
214222 // Launch transformer
215223 $ form ->submit ('foo ' );
216224
225+ $ this ->assertTrue ($ form ->isSubmitted ());
226+ $ this ->assertTrue ($ form ->isSynchronized ());
217227 $ this ->expectNoValidate ();
218228
219229 $ this ->validator ->validate ($ form , new Form ());
@@ -236,6 +246,8 @@ public function testDontValidateChildConstraintsIfCallableNoValidationGroups()
236246 $ form ->add ($ child );
237247 $ form ->submit ([]);
238248
249+ $ this ->assertTrue ($ form ->isSubmitted ());
250+ $ this ->assertTrue ($ form ->isSynchronized ());
239251 $ this ->expectNoValidate ();
240252
241253 $ this ->validator ->validate ($ form , new Form ());
@@ -264,6 +276,8 @@ function () { throw new TransformationFailedException(); }
264276 // Launch transformer
265277 $ form ->submit ('foo ' );
266278
279+ $ this ->assertTrue ($ form ->isSubmitted ());
280+ $ this ->assertFalse ($ form ->isSynchronized ());
267281 $ this ->expectNoValidate ();
268282
269283 $ this ->validator ->validate ($ form , new Form ());
@@ -299,6 +313,8 @@ function () { throw new TransformationFailedException(); }
299313 // Launch transformer
300314 $ form ->submit ('foo ' );
301315
316+ $ this ->assertTrue ($ form ->isSubmitted ());
317+ $ this ->assertFalse ($ form ->isSynchronized ());
302318 $ this ->expectNoValidate ();
303319
304320 $ this ->validator ->validate ($ form , new Form ());
@@ -410,6 +426,8 @@ function () { throw new TransformationFailedException(); }
410426 // Launch transformer
411427 $ form ->submit (['child ' => 'foo ' ]);
412428
429+ $ this ->assertTrue ($ form ->isSubmitted ());
430+ $ this ->assertFalse ($ form ->isSynchronized ());
413431 $ this ->expectNoValidate ();
414432
415433 $ this ->validator ->validate ($ form , new Form ());
@@ -615,7 +633,10 @@ public function testDontWalkScalars()
615633 $ form = $ this ->getBuilder ()
616634 ->setData ('scalar ' )
617635 ->getForm ();
636+ $ form ->submit ('foo ' );
618637
638+ $ this ->assertTrue ($ form ->isSubmitted ());
639+ $ this ->assertTrue ($ form ->isSynchronized ());
619640 $ this ->expectNoValidate ();
620641
621642 $ this ->validator ->validate ($ form , new Form ());
@@ -633,6 +654,8 @@ public function testViolationIfExtraData()
633654
634655 $ form ->submit (['foo ' => 'bar ' ]);
635656
657+ $ this ->assertTrue ($ form ->isSubmitted ());
658+ $ this ->assertTrue ($ form ->isSynchronized ());
636659 $ this ->expectNoValidate ();
637660
638661 $ this ->validator ->validate ($ form , new Form ());
@@ -654,6 +677,8 @@ public function testViolationFormatIfMultipleExtraFields()
654677
655678 $ form ->submit (['foo ' => 'bar ' , 'baz ' => 'qux ' , 'quux ' => 'quuz ' ]);
656679
680+ $ this ->assertTrue ($ form ->isSubmitted ());
681+ $ this ->assertTrue ($ form ->isSynchronized ());
657682 $ this ->expectNoValidate ();
658683
659684 $ this ->validator ->validate ($ form , new Form ());
0 commit comments