8000 [Form] added test with null parent · symfony/symfony@214f0de · GitHub
[go: up one dir, main page]

Skip to content

Commit 214f0de

Browse files
committed
[Form] added test with null parent
1 parent a1e6cfb commit 214f0de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,14 @@ public function testFormCanHaveEmptyName()
665665
$this->assertEquals('', $form->getName());
666666
}
667667

668+
public function testSetNullParentWorksWithEmptyName()
669+
{
670+
$form = $this->getBuilder('')->getForm();
671+
$form->setParent(null);
672+
673+
$this->assertNull($form->getParent());
674+
}
675+
668676
/**
669677
* @expectedException Symfony\Component\Form\Exception\FormException
670678
* @expectedExceptionMessage A form with an empty name cannot have a parent form.

0 commit comments

Comments
 (0)
0