By default, the section is disabled. If any configuration is specified then
the node will be automatically enabled:
enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden
enableableArrayNode: ~ # The config is enabled & use the default values
enableableArrayNode: true # The config is enabled & use the default values
enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden
enableableArrayNode: {enabled: false, ...} # The config is disabled
enableableArrayNode: false # The config is disabled
public canBeEnabled ( ) : |
||
Résultat |
/** * @dataProvider getEnableableNodeFixtures */ public function testTrueEnableEnabledNode($expected, $config, $message) { $processor = new Processor(); $node = new ArrayNodeDefinition('root'); $node->canBeEnabled()->children()->scalarNode('foo')->defaultValue('bar')->end(); $this->assertEquals($expected, $processor->process($node->getNode(), $config), $message); }