コード例 #1
0
 /**
  * @test
  */
 public function it_fails_when_a_requested_child_node_is_no_array_node_itself()
 {
     $treeBuilder = new TreeBuilder();
     $root = $treeBuilder->root('root');
     $root->children()->arrayNode('sub_node')->children()->scalarNode('scalar_node');
     $node = $treeBuilder->buildTree();
     $this->setExpectedException('Matthias\\SymfonyConfigTest\\Partial\\Exception\\ChildIsNotAnArrayNode', 'Child node "scalar_node" is not an array node (current path: "root.sub_node")');
     PartialNode::excludeEverythingNotInPath($node, array('sub_node', 'scalar_node'));
 }