Completed
Pull Request — master (#240)
by Beñat
04:56
created

UserProfileEditedSpec::it_creates_event()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 11
rs 9.4285
c 0
b 0
f 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\IdentityAccess\Domain\Model\User;
14
15
use BenGorUser\User\Domain\Model\UserEmail;
16
use BenGorUser\User\Domain\Model\UserId;
17
use Kreta\IdentityAccess\Domain\Model\User\UserProfileEdited;
18
use PhpSpec\ObjectBehavior;
19
20
class UserProfileEditedSpec extends ObjectBehavior
21
{
22
    function it_creates_event()
23
    {
24
        $id = new UserId('user-id');
25
        $email = new UserEmail('[email protected]');
26
        $this->beConstructedWith($id, $email);
27
        $this->shouldHaveType(UserProfileEdited::class);
28
29
        $this->id()->shouldReturn($id);
30
        $this->email()->shouldReturn($email);
31
        $this->occurredOn()->shouldReturnAnInstanceOf(\DateTimeImmutable::class);
32
    }
33
}
34