PostDeletedOEventContract   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testPostCreatedOEvent() 0 6 1
A createEvent() 0 3 1
1
<?php
2
3
namespace App\Tests\Modules\Posts\Contracts\Outbound;
4
5
use App\Modules\Posts\Domain\Dto\DeleteExistingPostDto;
6
use App\Modules\Posts\Domain\Event\Outbound\PostDeletedOEvent;
7
use App\Tests\TestUtils\Contracts\ApplicationOutboundEventContract;
8
use Symfony\Component\Uid\Ulid;
9
10
class PostDeletedOEventContract extends ApplicationOutboundEventContract
11
{
12
13
    public function testPostCreatedOEvent()
14
    {
15
        self::assertTrue(
16
            $this->verifyContracts($this->createEvent(), [
17
                'Comments/PostDeletedCommentsIEvent',
18
                'Tags/PostDeletedTagsIEvent',
19
            ])
20
        );
21
    }
22
23
    /**
24
     * @return PostDeletedOEvent
25
     */
26
    protected function createEvent(): PostDeletedOEvent
27
    {
28
        return new PostDeletedOEvent(new DeleteExistingPostDto(new Ulid()));
29
    }
30
}