forked from SymfonyTest/SymfonyConfigTest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigurationStub.php
More file actions
30 lines (26 loc) · 882 Bytes
/
Copy pathConfigurationStub.php
File metadata and controls
30 lines (26 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
namespace Matthias\SymfonyConfigTest\Tests\Partial\Fixtures;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class ConfigurationStub implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('root');
$root = $treeBuilder->getRootNode();
$root
->children()
->arrayNode('only_test_this_node')
->children()
->scalarNode('scalar_node')
->end()
->end()
->end()
->arrayNode('ignore_this_node')
// this would normally trigger an error
->isRequired()
->end()
->end();
return $treeBuilder;
}
}