composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
|
@ -231,6 +231,25 @@ class ArrayNodeDefinitionTest extends TestCase
|
|||
$this->assertFalse($this->getField($node, 'normalizeKeys'));
|
||||
}
|
||||
|
||||
public function testUnsetChild()
|
||||
{
|
||||
$node = new ArrayNodeDefinition('root');
|
||||
$node
|
||||
->children()
|
||||
->scalarNode('value')
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($value) {
|
||||
return empty($value);
|
||||
})
|
||||
->thenUnset()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
$this->assertSame(array(), $node->getNode()->normalize(array('value' => null)));
|
||||
}
|
||||
|
||||
public function testPrototypeVariable()
|
||||
{
|
||||
$node = new ArrayNodeDefinition('root');
|
||||
|
|
Reference in a new issue