DomainIdSpec   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 24
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 5 1
A it_should_return_id_by_getter() 0 4 1
A it_should_check_if_equal_other_domain_id() 0 5 1
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