DomainIdSpec::let()   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\Hexarchium\CoreDomain\Model\Domain;
4
5
use Hexarchium\CoreDomain\Model\Domain\DomainId;
6
use Hexarchium\CoreDomain\ValueObject\IdInterface;
7
use PhpSpec\ObjectBehavior;
8
9
class DomainIdSpec extends ObjectBehavior
10
{
11
    function let()
12
    {
13
        $this->beConstructedWith('Domain');
14
    }
15
16
    function it_is_initializable()
17
    {
18
        $this->shouldHaveType(DomainId::class);
19
        $this->shouldBeAnInstanceOf(IdInterface::class);
20
    }
21
22
    function it_should_return_id_by_getter()
23
    {
24
        $this->getId()->shouldReturn('Domain');
25
    }
26
27
    function it_should_check_if_equal_other_domain_id()
28
    {
29
        $this->equal(new DomainId('Domain'))->shouldReturn(true);
30
        $this->equal(new DomainId('OtherDomain'))->shouldReturn(false);
31
    }
32
}
33