it_should_have_a_parameters_accessor()   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\Flash;
4
5
use PhpSpec\ObjectBehavior;
6
7
class MessageSpec extends ObjectBehavior
8
{
9
    function let()
10
    {
11
        $this->beConstructedWith('Hello {{ name }}!', array('{{ name }}' => 'George'), 123);
12
    }
13
14
    function it_should_have_a_template_accessor()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_have_a_template_accessor" is not in camel caps format
Loading history...
15
    {
16
        $this->getTemplate()->shouldReturn('Hello {{ name }}!');
17
    }
18
19
    function it_should_have_a_parameters_accessor()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_have_a_parameters_accessor" is not in camel caps format
Loading history...
20
    {
21
        $this->getParameters()->shouldReturn(array('{{ name }}' => 'George'));
22
    }
23
24
    function it_should_have_a_pluralization_accessor()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_have_a_pluralization_accessor" is not in camel caps format
Loading history...
25
    {
26
        $this->getPluralization()->shouldReturn(123);
27
    }
28
29
    function it_should_use_null_as_default_pluralization()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_use_null_as_default_pluralization" is not in camel caps format
Loading history...
30
    {
31
        $this->beConstructedWith('Hello {{ name }}!', array('{{ name }}' => 'George'));
32
33
        $this->getPluralization()->shouldReturn(null);
34
    }
35
36
    function it_should_use_empty_array_as_default_parameters()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_use_empty_array_as_default_parameters" is not in camel caps format
Loading history...
37
    {
38
        $this->beConstructedWith('Hello {{ name }}!');
39
40
        $this->getParameters()->shouldReturn(array());
41
    }
42
43
    function it_should_have_a_string_representation_with_replaced_parameter_holders()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_have_a_string_representation_with_replaced_parameter_holders" is not in camel caps format
Loading history...
44
    {
45
        $this->beConstructedWith('Hello %name%!', array('%name%' => 'John'));
46
47
        $this->__toString()->shouldReturn('Hello John!');
48
    }
49
50
    function it_should_be_serializable()
0 ignored issues
show
Coding Style introduced by
Method name "MessageSpec::it_should_be_serializable" is not in camel caps format
Loading history...
51
    {
52
        $this->shouldBeAnInstanceOf('Serializable');
53
    }
54
}
55