Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
collection expects:
 - to have an object (array/traversable) and hydrator, or
 - that its target element have an object (allows binding) and hydrator

to be able to extract the values from the object bound to it

previously the collection was being assigned a hydrator. with that gone,
we now have to assign an object and a hydrator to its target element.
  • Loading branch information
radnan committed Feb 1, 2014
1 parent 8505b40 commit d0fb650
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/ZendTest/Form/Element/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ public function testCanBindObjectAndPopulateAndExtractNestedFieldsets()
$productFieldset->setHydrator(new \Zend\Stdlib\Hydrator\ClassMethods());

$mainFieldset = new Fieldset('shop');
$mainFieldset->setHydrator(new \Zend\Stdlib\Hydrator\ClassMethods());
$mainFieldset->setObject(new stdClass);
$mainFieldset->setHydrator(new ObjectPropertyHydrator());
$mainFieldset->add($productFieldset);

$form = new Form();
Expand Down

0 comments on commit d0fb650

Please sign in to comment.