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

ModelIdSpec::it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 5
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace spec\Hexarchium\CoreDomain\Model\Domain\Model;
4
5
use Hexarchium\CoreDomain\Model\Domain\DomainId;
6
use Hexarchium\CoreDomain\Model\Domain\Model\ModelId;
7
use Hexarchium\CoreDomain\ValueObject\AbstractDomainId;
8
use PhpSpec\ObjectBehavior;
9
10
class ModelIdSpec extends ObjectBehavior
11
{
12
    function let()
13
    {
14
        $this->beConstructedWith(new DomainId('DomainId'), 'ModelId');
15
    }
16
17
    function it_is_initializable()
18
    {
19
        $this->shouldHaveType(ModelId::class);
20
        $this->shouldBeAnInstanceOf(AbstractDomainId::class);
21
    }
22
23
    function it_should_return_domain_id_by_getter()
24
    {
25
        $this->getDomainId()->shouldBeAnInstanceOf(DomainId::class);
26
    }
27
28
    function it_should_return_id_by_getter()
29
    {
30
        $this->getId()->shouldReturn('ModelId');
31
    }
32
}
33