ensure to expect no validation for the right reasons
This commit is contained in:
parent
8e9aafc84f
commit
8d46f95f4c
@ -133,7 +133,10 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
$parent->add($form);
|
||||
|
||||
$form->setData($object);
|
||||
$parent->submit([]);
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -188,10 +191,15 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
'validation_groups' => [],
|
||||
])
|
||||
->setData($object)
|
||||
->setCompound(true)
|
||||
->setDataMapper(new PropertyPathMapper())
|
||||
->getForm();
|
||||
|
||||
$form->setData($object);
|
||||
$form->submit([]);
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -214,6 +222,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
// Launch transformer
|
||||
$form->submit('foo');
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -236,6 +246,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
$form->add($child);
|
||||
$form->submit([]);
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -264,6 +276,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
// Launch transformer
|
||||
$form->submit('foo');
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertFalse($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -299,6 +313,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
// Launch transformer
|
||||
$form->submit('foo');
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertFalse($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -369,6 +385,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
// Launch transformer
|
||||
$form->submit(['child' => 'foo']);
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertFalse($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -574,7 +592,10 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
$form = $this->getBuilder()
|
||||
->setData('scalar')
|
||||
->getForm();
|
||||
$form->submit('foo');
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -592,6 +613,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
|
||||
$form->submit(['foo' => 'bar']);
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
@ -613,6 +636,8 @@ class FormValidatorTest extends ConstraintValidatorTestCase
|
||||
|
||||
$form->submit(['foo' => 'bar', 'baz' => 'qux', 'quux' => 'quuz']);
|
||||
|
||||
$this->assertTrue($form->isSubmitted());
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->expectNoValidate();
|
||||
|
||||
$this->validator->validate($form, new Form());
|
||||
|
Reference in New Issue
Block a user