merged branch bschussek/bugfix (PR #6630)

This PR was merged into the master branch.

Commits
-------

c1aff96 [Form] Fixed regression introduced when merging 2.1 into master

Discussion
----------

[Form] Fixed regression introduced when merging 2.1 into master

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This commit is contained in:
Fabien Potencier 2013-01-09 10:47:19 +01:00
commit b981a6fa60
2 changed files with 0 additions and 4 deletions

View File

@ -211,7 +211,6 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
{
$config = parent::getFormConfig();
$config->factory = null;
$config->parent = null;
$config->children = array();
$config->unresolvedChildren = array();

View File

@ -247,17 +247,14 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase
$config = $builder->getFormConfig();
$reflClass = new \ReflectionClass($config);
$factory = $reflClass->getProperty('factory');
$parent = $reflClass->getProperty('parent');
$children = $reflClass->getProperty('children');
$unresolvedChildren = $reflClass->getProperty('unresolvedChildren');
$factory->setAccessible(true);
$parent->setAccessible(true);
$children->setAccessible(true);
$unresolvedChildren->setAccessible(true);
$this->assertNull($factory->getValue($config));
$this->assertNull($parent->getValue($config));
$this->assertEmpty($children->getValue($config));
$this->assertEmpty($unresolvedChildren->getValue($config));