Passed
Push — master ( 7b7e33...6ff579 )
by Tomasz
04:38
created

CommandSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 1
b 0
f 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 5 1
A defaultConstructor() 0 4 1
A it_id_have_access_by_getter() 0 5 1
1
<?php
2
3
namespace spec\Hexarchium\CoreDomain\UseCase\CreateDomain;
4
5
use Hexarchium\CoreDomain\UseCase\CreateDomain\Command;
6
use PhpSpec\ObjectBehavior;
7
8
class CommandSpec extends ObjectBehavior
9
{
10
    function it_is_initializable()
11
    {
12
        $this->defaultConstructor();
13
        $this->shouldHaveType(Command::class);
14
    }
15
16
    function defaultConstructor()
17
    {
18
        $this->beConstructedWith('Domain');
19
    }
20
21
    function it_id_have_access_by_getter()
22
    {
23
        $this->defaultConstructor();
24
        $this->getDomainId()->shouldReturn('Domain');
25
    }
26
}
27