Completed
Push — master ( 92ae82...f3eeb1 )
by Beñat
02:57
created

EventStreamSpec::it_is_initializable()   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
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
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\SharedKernel\Event;
14
15
use Kreta\SharedKernel\Domain\Model\DomainEventCollection;
16
use Kreta\SharedKernel\Domain\Model\Identity\Id;
17
use Kreta\SharedKernel\Event\EventStream;
18
use PhpSpec\ObjectBehavior;
19
20
class EventStreamSpec extends ObjectBehavior
21
{
22
    function let(Id $aggregateId, DomainEventCollection $events)
23
    {
24
        $this->beConstructedWith($aggregateId, $events);
25
    }
26
27
    function it_is_initializable()
28
    {
29
        $this->shouldHaveType(EventStream::class);
30
    }
31
32
    function it_gets_aggregate_id(Id $aggregateId)
33
    {
34
        $this->aggregateId()->shouldReturn($aggregateId);
35
    }
36
37
    function it_gets_events(DomainEventCollection $events)
38
    {
39
        $this->events()->shouldReturn($events);
40
    }
41
}
42