CommentsBaselinedOEventContract   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createEvent() 0 5 1
A testCommentCreatedOEvent() 0 4 1
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
}