Completed
Push — master ( c46380...c1cd82 )
by Gorka
22s
created

MemberRemovedSpec::it_gets_member_id()   A

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 1
1
<?php
2
3
/*
4
 * This file is part of the Kreta package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Spec\Kreta\TaskManager\Domain\Model\Organization;
14
15
use Kreta\SharedKernel\Domain\Model\DomainEvent;
16
use Kreta\TaskManager\Domain\Model\Organization\MemberId;
17
use Kreta\TaskManager\Domain\Model\Organization\MemberRemoved;
18
use Kreta\TaskManager\Domain\Model\Organization\OrganizationId;
19
use PhpSpec\ObjectBehavior;
20
21
class MemberRemovedSpec extends ObjectBehavior
22
{
23
    function let(OrganizationId $organizationId, MemberId $memberId)
24
    {
25
        $this->beConstructedWith($organizationId, $memberId);
26
    }
27
28
    function it_is_initializable()
29
    {
30
        $this->shouldHaveType(MemberRemoved::class);
31
        $this->shouldImplement(DomainEvent::class);
32
    }
33
34
    function it_get_occurred_on()
35
    {
36
        $this->occurredOn()->shouldReturnAnInstanceOf(\DateTimeInterface::class);
37
    }
38
39
    function it_gets_organization_id(OrganizationId $organizationId)
40
    {
41
        $this->organizationId()->shouldReturn($organizationId);
42
    }
43
44
    function it_gets_member_id(MemberId $memberId)
45
    {
46
        $this->memberId()->shouldReturn($memberId);
47
    }
48
}
49