UserProfileEditedSpec::it_creates_event()   A
last analyzed

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
declare(strict_types=1);
14
15
namespace Spec\Kreta\IdentityAccess\Domain\Model\User;
16
17
use BenGorUser\User\Domain\Model\UserEmail;
18
use BenGorUser\User\Domain\Model\UserId;
19
use Kreta\IdentityAccess\Domain\Model\User\UserProfileEdited;
20
use PhpSpec\ObjectBehavior;
21
22
class UserProfileEditedSpec extends ObjectBehavior
23
{
24
    function it_creates_event()
25
    {
26
        $id = new UserId('user-id');
27
        $email = new UserEmail('[email protected]');
28
        $this->beConstructedWith($id, $email);
29
        $this->shouldHaveType(UserProfileEdited::class);
30
31
        $this->id()->shouldReturn($id);
32
        $this->email()->shouldReturn($email);
33
        $this->occurredOn()->shouldReturnAnInstanceOf(\DateTimeImmutable::class);
34
    }
35
}
36