GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#7)
by Fábio Tadeu da
02:54
created

MapBasedEventsHandlerTest::setUpDependencies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Dsantang\DomainEventsDoctrine\Tests\Integration;
6
7
use Doctrine\ORM\EntityManagerInterface;
8
use Doctrine\ORM\UnitOfWork;
9
use Dsantang\DomainEventsDoctrine\Outbox\MapBased;
10
use Dsantang\DomainEventsDoctrine\Tests\OutboxSubClass;
11
use Dsantang\DomainEventsDoctrine\Tests\Unit\Outbox\EventArgsProvider;
12
use Dsantang\DomainEventsDoctrine\Tests\Unit\Outbox\Stub\Converters\FirstOutboxConverter;
13
use Dsantang\DomainEventsDoctrine\Tests\Unit\Outbox\Stub\DomainEvents\FirstDomainEvent;
14
use PHPUnit\Framework\TestCase;
15
16
final class MapBasedEventsHandlerTest extends TestCase
17
{
18
    use EventArgsProvider;
19
20
    /** @var MapBased */
21
    private $mapBasedEventsHandler;
22
23
    /**
24
     * @before
25
     */
26
    public function setUpDependencies() : void
27
    {
28
        $this->mapBasedEventsHandler = new MapBased(new OutboxSubClass());
29
30
        $this->entityManager = $this->createMock(EntityManagerInterface::class);
31
        $this->unitOfWork    = $this->createMock(UnitOfWork::class);
32
    }
33
34
    public function testOutboxHappyPathWorkflowOnFlushEvent() : void
35
    {
36
        $this->mapBasedEventsHandler->addConverter(
37
            FirstDomainEvent::class,
38
            new FirstOutboxConverter()
39
        );
40
41
        $eventArgs = $this->getEventArgs();
42
43
        $this->entityManager->expects(self::once())->method('persist');
44
        $this->unitOfWork->expects(self::once())->method('computeChangeSets');
45
46
        $this->mapBasedEventsHandler->onFlush($eventArgs);
47
    }
48
}
49