Completed
Branch master (6ff579)
by Tomasz
06:50 queued 03:50
created

DomainIdSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 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
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