ModelSpec::it_is_initializable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace spec\Hexarchium\CoreDomain\Model\Domain\Entity;
4
5
use Hexarchium\CoreDomain\Aggregate\AggregateRootInterface;
6
use Hexarchium\CoreDomain\Model\Domain\Entity\Domain;
7
use Hexarchium\CoreDomain\Model\Domain\Entity\Model;
8
use Hexarchium\CoreDomain\Model\Domain\Model\ModelId;
9
use PhpSpec\ObjectBehavior;
10
11
class ModelSpec extends ObjectBehavior
12
{
13
    function let(ModelId $modelId)
14
    {
15
        $this->beConstructedWith($modelId);
16
    }
17
18
    function it_is_initializable()
19
    {
20
        $this->shouldHaveType(Model::class);
21
        $this->shouldNotBeAnInstanceOf(AggregateRootInterface::class);
22
    }
23
24
    function it_should_return_id_by_getter()
25
    {
26
        $this->getId()->shouldReturnAnInstanceOf(ModelId::class);
27
    }
28
29
    function it_should_allow_assign_domain(Domain $domain)
30
    {
31
        $this->setDomain($domain)->shouldReturn(null);
32
    }
33
}
34