EntityManagerContainerTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ArpTest\LaminasDoctrine\Service\EntityManager;
6
7
use Arp\LaminasDoctrine\Service\ContainerInterface;
8
use Arp\LaminasDoctrine\Service\EntityManager\EntityManagerContainer;
9
use Laminas\ServiceManager\Exception\InvalidArgumentException;
10
use PHPUnit\Framework\MockObject\MockObject;
11
use PHPUnit\Framework\TestCase;
12
use Psr\Container\ContainerInterface as PsrContainerInterface;
13
14
/**
15
 * @covers \Arp\LaminasDoctrine\Service\EntityManager\EntityManagerContainer
16
 *
17
 * @author  Alex Patterson <[email protected]>
18
 * @package ArpTest\LaminasDoctrine\Service
19
 */
20
final class EntityManagerContainerTest extends TestCase
21
{
22
    /**
23
     * @var PsrContainerInterface&MockObject
24
     */
25
    private $psrContainer;
26
27
    /**
28
     * Prepare the test case dependencies
29
     */
30
    public function setUp(): void
31
    {
32
        $this->psrContainer = $this->createMock(PsrContainerInterface::class);
33
    }
34
35
    /**
36
     * Assert the class implements ContainerInterface
37
     *
38
     * @throws InvalidArgumentException
39
     */
40
    public function testImplementsContainerInterface(): void
41
    {
42
        $container = new EntityManagerContainer($this->psrContainer);
43
44
        $this->assertInstanceOf(ContainerInterface::class, $container);
45
    }
46
}
47