Completed
Push — master ( e6fe6f...a29d2d )
by Hannes
09:33
created

it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace spec\byrokrat\autogiro\Tree;
6
7
use byrokrat\autogiro\Tree\RequestMandateAcceptanceNode;
8
use byrokrat\autogiro\Tree\Node;
9
use byrokrat\autogiro\Tree\BankgiroNode;
10
use byrokrat\autogiro\Tree\PayerNumberNode;
11
use PhpSpec\ObjectBehavior;
12
13 View Code Duplication
class RequestMandateAcceptanceNodeSpec extends ObjectBehavior
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    function let(BankgiroNode $bankgiro, PayerNumberNode $payerNr)
16
    {
17
        $this->beConstructedWith($bankgiro, $payerNr);
18
    }
19
20
    function it_is_initializable()
21
    {
22
        $this->shouldHaveType(RequestMandateAcceptanceNode::CLASS);
23
    }
24
25
    function it_implements_node_interface()
26
    {
27
        $this->shouldHaveType(Node::CLASS);
28
    }
29
30
    function it_contains_a_type()
31
    {
32
        $this->getType()->shouldEqual('RequestMandateAcceptanceNode');
33
    }
34
35
    function it_contains_a_bankgiro($bankgiro)
36
    {
37
        $this->getChild('bankgiro')->shouldEqual($bankgiro);
38
    }
39
40
    function it_contains_a_payer_nr($payerNr)
41
    {
42
        $this->getChild('payer_number')->shouldEqual($payerNr);
43
    }
44
45
    function it_contains_a_line_number($bankgiro, $payerNr)
46
    {
47
        $this->beConstructedWith($bankgiro, $payerNr, 3);
48
        $this->getLineNr()->shouldEqual(3);
49
    }
50
}
51