its_getConfigTreeBuilder_should_use_bundle_to_build_tree()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 12
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 7
nc 1
nop 5
1
<?php
2
namespace spec\Knp\RadBundle\AppBundle;
3
4
use PhpSpec\ObjectBehavior;
5
use Prophecy\Argument;
6
7
class ConfigurationSpec extends ObjectBehavior
8
{
9
    /**
10
     * @param Knp\RadBundle\AppBundle\ConfigurableBundleInterface $bundle
11
     * @param Knp\RadBundle\AppBundle\TreeBuilderFactory          $treeBuilderFactory
12
     */
13
    function let($bundle, $treeBuilderFactory)
14
    {
15
        $this->beConstructedWith($bundle, $treeBuilderFactory);
16
    }
17
    
18
    function it_should_have_bundle_accessor($bundle)
0 ignored issues
show
Coding Style introduced by
Method name "ConfigurationSpec::it_should_have_bundle_accessor" is not in camel caps format
Loading history...
19
    {
20
        $this->getBundle()->shouldReturn($bundle);
21
    }
22
    
23
    /**
24
     * @param Symfony\Component\DependencyInjection\Extension\ExtensionInterface $containerExtension
25
     * @param Symfony\Component\Config\Definition\Builder\TreeBuilder            $treeBuilder
26
     * @param Symfony\Component\Config\Definition\Builder\NodeParentInterface    $rootNode
27
     */
28
    function its_getConfigTreeBuilder_should_use_bundle_to_build_tree($bundle, $containerExtension, $treeBuilderFactory, $treeBuilder, $rootNode)
0 ignored issues
show
Coding Style introduced by
Method name "ConfigurationSpec::its_getConfigTreeBuilder_should_use_bundle_to_build_tree" is not in camel caps format
Loading history...
29
    {
30
        $bundle->getContainerExtension()->willReturn($containerExtension);
31
        $containerExtension->getAlias()->willReturn('some_alias');
32
33
        $treeBuilderFactory->createTreeBuilder()->willReturn($treeBuilder);
34
        $treeBuilder->root('some_alias')->willReturn($rootNode);
35
36
        $bundle->buildConfiguration($rootNode)->shouldBeCalled();
37
38
        $this->getConfigTreeBuilder()->shouldReturn($treeBuilder);
39
    }
40
}
41