CommentsBaselinedOEventContract::createEvent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace App\Tests\Modules\Comments\Contracts\Outbound;
4
5
use App\Modules\Comments\Domain\Dto\CommentDto;
6
use App\Modules\Comments\Domain\Event\Outbound\CommentsBaselinedOEvent;
7
use App\Tests\TestUtils\Contracts\ApplicationOutboundEventContract;
8
use Symfony\Component\Uid\Ulid;
9
10
class CommentsBaselinedOEventContract extends ApplicationOutboundEventContract
11
{
12
13
    public function testCommentCreatedOEvent()
14
    {
15
        self::assertTrue(
16
            $this->verifyContracts($this->createEvent(), ['Posts/CommentsBaselinedPostsIEvent'])
17
        );
18
    }
19
20
    /**
21
     * @return CommentsBaselinedOEvent
22
     */
23
    protected function createEvent(): CommentsBaselinedOEvent
24
    {
25
        return new CommentsBaselinedOEvent(
26
            new Ulid(),
27
            [new CommentDto(new Ulid(), '', '', null, new \DateTime())]);
28
    }
29
}