FlashesNodeSpec::it_should_be_a_twig_node()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace spec\Knp\RadBundle\Twig;
4
5
use PhpSpec\ObjectBehavior;
6
7
class FlashesNodeSpec extends ObjectBehavior
8
{
9
    /**
10
     * @param  Twig_Node_Expression $types
11
     * @param  Twig_Node_Expression $catalog
12
     * @param  Twig_NodeInterface   $body
13
     */
14
    function let($types, $catalog, $body)
15
    {
16
        $this->beConstructedWith($types, $catalog, $body, 123);
17
    }
18
19
    function it_should_be_a_twig_node()
0 ignored issues
show
Coding Style introduced by
Method name "FlashesNodeSpec::it_should_be_a_twig_node" is not in camel caps format
Loading history...
20
    {
21
        $this->shouldBeAnInstanceOf('Twig_Node');
22
    }
23
24
    function it_should_be_constructible_with_no_types($catalog, $body)
0 ignored issues
show
Coding Style introduced by
Method name "FlashesNodeSpec::it_should_be_constructible_with_no_types" is not in camel caps format
Loading history...
25
    {
26
        $this->shouldNotThrow()->during('__construct', array(null, $catalog, $body, 123));
27
    }
28
29
    function it_should_be_constructible_with_no_catalog($types, $body)
0 ignored issues
show
Coding Style introduced by
Method name "FlashesNodeSpec::it_should_be_constructible_with_no_catalog" is not in camel caps format
Loading history...
30
    {
31
        $this->shouldNotThrow()->during('__construct', array($types, null, $body, 123));
32
    }
33
34
    /**
35
     * @param  Twig_Compiler $compiler
36
     */
37
    function it_should_compile($compiler, $types, $catalog, $body)
0 ignored issues
show
Coding Style introduced by
Method name "FlashesNodeSpec::it_should_compile" is not in camel caps format
Loading history...
38
    {
39
        $compiler->addDebugInfo($this)->shouldBeCalled()->willReturn($compiler);
40
        $compiler->subcompile($types)->shouldBeCalled()->willReturn($compiler);
41
        $compiler->subcompile($catalog)->shouldBeCalled()->willReturn($compiler);
42
        $compiler->subcompile($body)->shouldBeCalled()->willReturn($compiler);
43
44
        $compiler->write(\Prophecy\Argument::cetera())->willReturn($compiler);
45
        $compiler->raw(\Prophecy\Argument::cetera())->willReturn($compiler);
46
        $compiler->indent(\Prophecy\Argument::cetera())->willReturn($compiler);
47
        $compiler->outdent(\Prophecy\Argument::cetera())->willReturn($compiler);
48
49
        $this->compile($compiler);
50
    }
51
}
52