Skip to content

Commit 68018a1

Browse files
committed
[Form] Dropped useless test that is guaranteed by OptionsParser tests and that needs to be adapted very often
1 parent 649752c commit 68018a1

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

src/Symfony/Component/Form/Tests/FormFactoryTest.php

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -608,41 +608,8 @@ public function testCreateNamedBuilderFromParentBuilder()
608608
$this->assertEquals($parentBuilder, $builder->getParent());
609609
}
610610

611-
public function testUnknownOptions()
612-
{
613-
$type = new \Symfony\Component\Form\Extension\Core\Type\TextType();
614-
615-
$factory = new FormFactory(array(new \Symfony\Component\Form\Extension\Core\CoreExtension()));
616-
617-
$this->setExpectedException('Symfony\Component\Form\Exception\InvalidOptionException',
618-
'The options "invalid", "unknown" do not exist. Known options are: ' .
619-
'"attr", "by_reference", "data", "data_class", "disabled", ' .
620-
'"empty_data", "error_bubbling", "error_mapping", "invalid_message", ' .
621-
'"invalid_message_parameters", "label", "max_length", "pattern", ' .
622-
'"primitive", "property_path", "read_only", "required", ' .
623-
'"translation_domain", "trim"'
624-
);
625-
$factory->createNamedBuilder($type, "text", "value", array("invalid" => "opt", "unknown" => "opt"));
626-
}
627-
628-
public function testUnknownOption()
629-
{
630-
$type = new \Symfony\Component\Form\Extension\Core\Type\TextType();
631-
632-
$factory = new FormFactory(array(new \Symfony\Component\Form\Extension\Core\CoreExtension()));
633-
634-
$this->setExpectedException('Symfony\Component\Form\Exception\InvalidOptionException',
635-
'The option "unknown" does not exist. Known options are: "attr", ' .
636-
'"by_reference", "data", "data_class", "disabled", "empty_data", ' .
637-
'"error_bubbling", "error_mapping", "invalid_message", ' .
638-
'"invalid_message_parameters", "label", "max_length", "pattern", ' .
639-
'"primitive", "property_path", "read_only", "required", ' .
640-
'"translation_domain", "trim"'
641-
);
642-
$factory->createNamedBuilder($type, "text", "value", array("unknown" => "opt"));
643-
}
644611

645-
public function testFieldTypeCreatesDefaultValueForEmptyDataOption()
612+
public function testFormTypeCreatesDefaultValueForEmptyDataOption()
646613
{
647614
$factory = new FormFactory(array(new \Symfony\Component\Form\Extension\Core\CoreExtension()));
648615

0 commit comments

Comments
 (0)