/**
  * Generates the configuration tree builder.
  *
  * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
  */
 public function getConfigTreeBuilder()
 {
     $treeBuilder = new TreeBuilder();
     $rootNode = $treeBuilder->root($this->name);
     $this->factory->addConfiguration($rootNode);
     return $treeBuilder;
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function shouldAddDiscoveryPathToConfigurationWithExpectedDefaultValue()
 {
     $factory = new SamlSpFactory();
     $treeBuilder = new TreeBuilder();
     $factory->addConfiguration($treeBuilder->root('name'));
     /** @var $tree ArrayNode */
     $tree = $treeBuilder->buildTree();
     $children = $tree->getChildren();
     $this->assertArrayHasKey('discovery_path', $children);
     $this->assertInstanceOf('Symfony\\Component\\Config\\Definition\\ScalarNode', $children['discovery_path']);
     $this->assertEquals('/saml/sp/discovery', $children['discovery_path']->getDefaultValue());
 }