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