public static function applyConfiguration(NodeBuilder $node_builder) { $node_builder->arrayNode('coffee')->canBeDisabled()->addDefaultsIfNotSet()->children()->scalarNode('loader')->defaultValue('coffee')->end()->end()->end(); }
public function testConfigTreeBuilder() { $tree = new TreeBuilder(); $node = $tree->root('coffee')->children(); CoffeeScriptLoader::applyConfiguration($node); $node->end(); $config = $tree->buildTree()->finalize([]); $this->assertArrayHasKey('coffee', $config); $this->assertArrayHasKey('enabled', $config['coffee']); }