[Form] added test with null parent
This commit is contained in:
parent
a1e6cfbe15
commit
214f0de6e9
@ -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.
|
||||
|
Reference in New Issue
Block a user