Code Duplication    Length = 14-14 lines in 3 locations

Notifier/tests/Spec/Kreta/Notifier/Domain/Model/Inbox/Notification/NotificationMarkedAsReadSpec.php 1 location

@@ 24-37 (lines=14) @@
21
use Kreta\SharedKernel\Domain\Model\DomainEvent;
22
use PhpSpec\ObjectBehavior;
23
24
class NotificationMarkedAsReadSpec extends ObjectBehavior
25
{
26
    function it_should_be_created(NotificationId $notificationId, UserId $userId)
27
    {
28
        $this->beConstructedWith($notificationId, $userId);
29
        $this->shouldHaveType(NotificationMarkedAsRead::class);
30
        $this->shouldImplement(DomainEvent::class);
31
        $this->userId()->shouldReturn($userId);
32
        $this->notificationId()->shouldReturn($notificationId);
33
        $this->status()->shouldReturnAnInstanceOf(NotificationStatus::class);
34
        $this->status()->shouldBeAReadNotificationStatus();
35
        $this->occurredOn()->shouldReturnAnInstanceOf(\DateTimeInterface::class);
36
    }
37
}
38

Notifier/tests/Spec/Kreta/Notifier/Domain/Model/Inbox/Notification/NotificationMarkedAsUnreadSpec.php 1 location

@@ 24-37 (lines=14) @@
21
use Kreta\SharedKernel\Domain\Model\DomainEvent;
22
use PhpSpec\ObjectBehavior;
23
24
class NotificationMarkedAsUnreadSpec extends ObjectBehavior
25
{
26
    function it_should_be_created(NotificationId $notificationId, UserId $userId)
27
    {
28
        $this->beConstructedWith($notificationId, $userId);
29
        $this->shouldHaveType(NotificationMarkedAsUnread::class);
30
        $this->shouldImplement(DomainEvent::class);
31
        $this->userId()->shouldReturn($userId);
32
        $this->notificationId()->shouldReturn($notificationId);
33
        $this->status()->shouldReturnAnInstanceOf(NotificationStatus::class);
34
        $this->status()->shouldBeAnUnreadNotificationStatus();
35
        $this->occurredOn()->shouldReturnAnInstanceOf(\DateTimeInterface::class);
36
    }
37
}
38

Notifier/tests/Spec/Kreta/Notifier/Domain/Model/Inbox/Notification/NotificationPublishedSpec.php 1 location

@@ 25-38 (lines=14) @@
22
use Kreta\SharedKernel\Domain\Model\DomainEvent;
23
use PhpSpec\ObjectBehavior;
24
25
class NotificationPublishedSpec extends ObjectBehavior
26
{
27
    function it_should_be_created(NotificationId $notificationId, UserId $userId, NotificationBody $body)
28
    {
29
        $this->beConstructedWith($notificationId, $userId, $body);
30
        $this->shouldHaveType(NotificationPublished::class);
31
        $this->shouldImplement(DomainEvent::class);
32
        $this->occurredOn()->shouldReturnAnInstanceOf(\DateTimeInterface::class);
33
        $this->userId()->shouldReturn($userId);
34
        $this->notificationId()->shouldReturn($notificationId);
35
        $this->status()->shouldReturnAnInstanceOf(NotificationStatus::class);
36
        $this->body()->shouldReturn($body);
37
    }
38
}
39