[Form] Fixed regression introduced when merging 2.1 into master
This commit is contained in:
parent
f07c61d25c
commit
c1aff96eb0
@ -211,7 +211,6 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
|
|||||||
{
|
{
|
||||||
$config = parent::getFormConfig();
|
$config = parent::getFormConfig();
|
||||||
|
|
||||||
$config->factory = null;
|
|
||||||
$config->parent = null;
|
$config->parent = null;
|
||||||
$config->children = array();
|
$config->children = array();
|
||||||
$config->unresolvedChildren = array();
|
$config->unresolvedChildren = array();
|
||||||
|
@ -247,17 +247,14 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$config = $builder->getFormConfig();
|
$config = $builder->getFormConfig();
|
||||||
$reflClass = new \ReflectionClass($config);
|
$reflClass = new \ReflectionClass($config);
|
||||||
$factory = $reflClass->getProperty('factory');
|
|
||||||
$parent = $reflClass->getProperty('parent');
|
$parent = $reflClass->getProperty('parent');
|
||||||
$children = $reflClass->getProperty('children');
|
$children = $reflClass->getProperty('children');
|
||||||
$unresolvedChildren = $reflClass->getProperty('unresolvedChildren');
|
$unresolvedChildren = $reflClass->getProperty('unresolvedChildren');
|
||||||
|
|
||||||
$factory->setAccessible(true);
|
|
||||||
$parent->setAccessible(true);
|
$parent->setAccessible(true);
|
||||||
$children->setAccessible(true);
|
$children->setAccessible(true);
|
||||||
$unresolvedChildren->setAccessible(true);
|
$unresolvedChildren->setAccessible(true);
|
||||||
|
|
||||||
$this->assertNull($factory->getValue($config));
|
|
||||||
$this->assertNull($parent->getValue($config));
|
$this->assertNull($parent->getValue($config));
|
||||||
$this->assertEmpty($children->getValue($config));
|
$this->assertEmpty($children->getValue($config));
|
||||||
$this->assertEmpty($unresolvedChildren->getValue($config));
|
$this->assertEmpty($unresolvedChildren->getValue($config));
|
||||||
|
Reference in New Issue
Block a user