@@ -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 ());
@@ -369,6 +385,8 @@ function () { throw new TransformationFailedException(); }
369
385
// Launch transformer
370
386
$ form ->submit (['child ' => 'foo ' ]);
371
387
388
+ $ this ->assertTrue ($ form ->isSubmitted ());
389
+ $ this ->assertFalse ($ form ->isSynchronized ());
372
390
$ this ->expectNoValidate ();
373
391
374
392
$ this ->validator ->validate ($ form , new Form ());
@@ -574,7 +592,10 @@ public function testDontWalkScalars()
574
592
$ form = $ this ->getBuilder ()
575
593
->setData ('scalar ' )
576
594
->getForm ();
595
+ $ form ->submit ('foo ' );
577
596
597
+ $ this ->assertTrue ($ form ->isSubmitted ());
598
+ $ this ->assertTrue ($ form ->isSynchronized ());
578
599
$ this ->expectNoValidate ();
579
600
580
601
$ this ->validator ->validate ($ form , new Form ());
@@ -592,6 +613,8 @@ public function testViolationIfExtraData()
592
613
593
614
$ form ->submit (['foo ' => 'bar ' ]);
594
615
616
+ $ this ->assertTrue ($ form ->isSubmitted ());
617
+ $ this ->assertTrue ($ form ->isSynchronized ());
595
618
$ this ->expectNoValidate ();
596
619
597
620
$ this ->validator ->validate ($ form , new Form ());
@@ -613,6 +636,8 @@ public function testViolationFormatIfMultipleExtraFields()
613
636
614
637
$ form ->submit (['foo ' => 'bar ' , 'baz ' => 'qux ' , 'quux ' => 'quuz ' ]);
615
638
639
+ $ this ->assertTrue ($ form ->isSubmitted ());
640
+ $ this ->assertTrue ($ form ->isSynchronized ());
616
641
$ this ->expectNoValidate ();
617
642
618
643
$ this ->validator ->validate ($ form , new Form ());
0 commit comments