From 68018a10dac1e019c62d2523be12129fa3c5d1d7 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Fri, 20 Apr 2012 19:39:34 +0200 Subject: [PATCH] [Form] Dropped useless test that is guaranteed by OptionsParser tests and that needs to be adapted very often --- .../Component/Form/Tests/FormFactoryTest.php | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/Symfony/Component/Form/Tests/FormFactoryTest.php b/src/Symfony/Component/Form/Tests/FormFactoryTest.php index a45395921c..4b8eb3f3a9 100644 --- a/src/Symfony/Component/Form/Tests/FormFactoryTest.php +++ b/src/Symfony/Component/Form/Tests/FormFactoryTest.php @@ -608,41 +608,8 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($parentBuilder, $builder->getParent()); } - public function testUnknownOptions() - { - $type = new \Symfony\Component\Form\Extension\Core\Type\TextType(); - $factory = new FormFactory(array(new \Symfony\Component\Form\Extension\Core\CoreExtension())); - - $this->setExpectedException('Symfony\Component\Form\Exception\InvalidOptionException', - 'The options "invalid", "unknown" do not exist. Known options are: ' . - '"attr", "by_reference", "data", "data_class", "disabled", ' . - '"empty_data", "error_bubbling", "error_mapping", "invalid_message", ' . - '"invalid_message_parameters", "label", "max_length", "pattern", ' . - '"primitive", "property_path", "read_only", "required", ' . - '"translation_domain", "trim"' - ); - $factory->createNamedBuilder($type, "text", "value", array("invalid" => "opt", "unknown" => "opt")); - } - - public function testUnknownOption() - { - $type = new \Symfony\Component\Form\Extension\Core\Type\TextType(); - - $factory = new FormFactory(array(new \Symfony\Component\Form\Extension\Core\CoreExtension())); - - $this->setExpectedException('Symfony\Component\Form\Exception\InvalidOptionException', - 'The option "unknown" does not exist. Known options are: "attr", ' . - '"by_reference", "data", "data_class", "disabled", "empty_data", ' . - '"error_bubbling", "error_mapping", "invalid_message", ' . - '"invalid_message_parameters", "label", "max_length", "pattern", ' . - '"primitive", "property_path", "read_only", "required", ' . - '"translation_domain", "trim"' - ); - $factory->createNamedBuilder($type, "text", "value", array("unknown" => "opt")); - } - - public function testFieldTypeCreatesDefaultValueForEmptyDataOption() + public function testFormTypeCreatesDefaultValueForEmptyDataOption() { $factory = new FormFactory(array(new \Symfony\Component\Form\Extension\Core\CoreExtension()));