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

TaxRateManagerFactoryTest::testCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
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