Skip to content

Commit

Permalink
Add test nested form element wrapping (relative: zendframework#4383)
Browse files Browse the repository at this point in the history
  • Loading branch information
noopable committed Jun 4, 2013
1 parent 9d34a33 commit 50a6d12
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/ZendTest/Form/FormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1519,4 +1519,19 @@ public function testAddRemove()
$this->form->remove('file_resource');
$this->assertEquals($form, $this->form);
}

public function testNestedFormElementNameWrapping()
{
//build form
$rootForm = new Form;
$leafForm = new Form('form');
$element = new Element('element');
$leafForm->setWrapElements(true);
$leafForm->add($element);
$rootForm->add($leafForm);

//prepare for view
$rootForm->prepare();
$this->assertEquals('form[element]', $element->getName());
}
}

0 comments on commit 50a6d12

Please sign in to comment.