CommandHandlerFactoryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testInvoke() 0 12 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TogglJiraTest\Handler;
5
6
use Psr\Log\LoggerInterface;
7
use TogglJira\Handler\CommandHandler;
8
use TogglJira\Handler\CommandHandlerFactory;
9
use TogglJiraTest\BaseContainerTest;
10
11
class CommandHandlerFactoryTest extends BaseContainerTest
12
{
13
    public function testInvoke()
14
    {
15
        $factory = new CommandHandlerFactory();
16
17
        $loggerMock = \Mockery::mock(LoggerInterface::class);
18
        $this->getContainer()
19
            ->shouldReceive('get')
20
            ->once()
21
            ->withArgs(['Logger'])
22
            ->andReturn($loggerMock);
23
24
        $this->assertInstanceOf(CommandHandler::class, $factory($this->getContainer(), ''));
25
    }
26
}
27