[Form] added test with null parent

This commit is contained in:
Tobias Schultze 2012-08-26 21:12:48 +02:00
parent a1e6cfbe15
commit 214f0de6e9

View File

@ -665,6 +665,14 @@ class SimpleFormTest extends AbstractFormTest
$this->assertEquals('', $form->getName());
}
public function testSetNullParentWorksWithEmptyName()
{
$form = $this->getBuilder('')->getForm();
$form->setParent(null);
$this->assertNull($form->getParent());
}
/**
* @expectedException Symfony\Component\Form\Exception\FormException
* @expectedExceptionMessage A form with an empty name cannot have a parent form.