Completed
Push — master ( d19556...dcc177 )
by Al3x
08:24
created

TaxRateManagerFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
wmc 1
lcom 1
cbo 4
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreate() 0 12 1
1
<?php
2
declare(strict_types=1);
3
4
namespace InvoiceNinjaModuleTest\Service;
5
6
use Interop\Container\ContainerInterface;
7
use InvoiceNinjaModule\Service\Interfaces\ObjectServiceInterface;
8
use InvoiceNinjaModule\Service\Interfaces\TaxRateManagerInterface;
9
use InvoiceNinjaModule\Service\ObjectService;
10
use InvoiceNinjaModule\Service\TaxRateManagerFactory;
11
use PHPUnit\Framework\TestCase;
12
13
class TaxRateManagerFactoryTest extends TestCase
14
{
15
    public function testCreate() :void
16
    {
17
        $containerMock = $this->createMock(ContainerInterface::class);
18
        $containerMock->expects(self::once())
19
            ->method('get')
20
            ->with(self::stringContains(ObjectService::class))
21
            ->willReturn($this->createMock(ObjectServiceInterface::class));
22
23
        $factory = new TaxRateManagerFactory();
24
        $result = $factory($containerMock, 'test');
25
        self::assertInstanceOf(TaxRateManagerInterface::class, $result);
26
    }
27
}
28