More tests for nested form fieldsets #6100

Merged
merged 5 commits into from Apr 14, 2014

4 participants

@thestanislav

This PR is related to #5093, #6098 and may be with #5640 and others.
I have made more complex test for extracting and populating values to nested form fieldsets.

Strange situation is that I have commented the changes those were made in this PR #5093 and all form test passed without any problem.
Unfortunately, I do not remember why I made that PR #5093 then, may be I was too newbie in ZF2 or changes made after, had fixed the issues I had been faced then.

Nevertheless, if all tests are passed without changes made in PR #5093, may be we could remove that code

@thestanislav

The PR should tests following nested fieldsets for proper object binding, value extraction and population:
form -> collection -> fieldset
form -> collection -> fieldset -> fieldset
form -> collection -> fieldset -> collection
form -> collection -> fieldset -> collection -> fieldset

@thestanislav

It will be good if someone could provide some failing tests :)

@samsonasik samsonasik commented on an outdated diff Apr 8, 2014
library/Zend/Form/Element/Collection.php
@@ -350,7 +350,7 @@ public function getTargetElement()
*/
public function setAllowAdd($allowAdd)
{
- $this->allowAdd = (bool) $allowAdd;
+ $this->allowAdd = (bool)$allowAdd;
@samsonasik
samsonasik added a line comment Apr 8, 2014

space after cast is already correct, see #5114 and #4099

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@samsonasik

you need to avoid cosmetic change on PR, just change/add/remove that related with PR, no need to change other things that not related with PR.

@thestanislav

@samsonasik, sorry for that, my IDE makes those "cosmetic changes" automatically.

@Ocramius Ocramius added the Form label Apr 8, 2014
@weierophinney weierophinney added a commit that referenced this pull request Apr 14, 2014
@weierophinney weierophinney [#6100] revert formatting changes
- Reverted to original (or what should have been in original)
8053ba2
@weierophinney weierophinney added a commit that referenced this pull request Apr 14, 2014
@weierophinney weierophinney Merge branch 'hotfix/6100' into develop
Forward port #6100
5f63c10
@weierophinney weierophinney merged commit e736d69 into zendframework:master Apr 14, 2014

1 check passed

Details continuous-integration/travis-ci The Travis CI build passed
@weierophinney weierophinney added a commit that referenced this pull request Apr 14, 2014
@weierophinney weierophinney Merge branch 'hotfix/6100'
Close #6100
Fixes #6098
1dbd54d
@weierophinney weierophinney added this to the 2.3.1 milestone Apr 14, 2014
@weierophinney weierophinney self-assigned this Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment