Completed
Push — master ( 1fe5d2...6a0fd3 )
by Tomasz
02:28
created

CommandSpec   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 4 1
A it_should_have_domain_id_getter() 0 4 1
A it_should_have_usecase_id_getter() 0 4 1
A it_should_have_usecase_type_getter() 0 4 1
1
<?php
2
3
namespace spec\Hexarchium\CoreDomain\UseCase\CreateUseCase;
4
5
use Hexarchium\CoreDomain\Model\Domain\DomainId;
6
use Hexarchium\CoreDomain\Model\Domain\UseCase\UseCaseId;
7
use Hexarchium\CoreDomain\UseCase\CreateUseCase\Command;
8
use PhpSpec\ObjectBehavior;
9
10
class CommandSpec extends ObjectBehavior
11
{
12
    function let(UseCaseId $useCaseId, DomainId $domainId)
13
    {
14
        $this->beConstructedWith($useCaseId, $domainId, 'command');
15
    }
16
17
    function it_is_initializable()
18
    {
19
        $this->shouldHaveType(Command::class);
20
    }
21
22
    function it_should_have_domain_id_getter()
23
    {
24
        $this->getDomainId()->shouldBeAnInstanceOf(DomainId::class);
25
    }
26
27
    function it_should_have_usecase_id_getter()
28
    {
29
        $this->getUseCaseId()->shouldBeAnInstanceOf(UseCaseId::class);
30
    }
31
32
    function it_should_have_usecase_type_getter()
33
    {
34
        $this->getUseCaseType()->shouldBeString();
35
    }
36
37
}
38