ContainerAwareTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
c 0
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCheckInitOnlyOnce() 0 9 1
1
<?php
2
3
namespace Nip\Container\Tests;
4
5
use Nip\Container\Container;
6
use Nip\Container\Tests\Fixtures\ObjectHasContainer;
7
8
/**
9
 * Class ContainerTest
10
 * @package Nip\Tests\Container
11
 */
12
class ContainerAwareTest extends AbstractTest
13
{
14
    public function testCheckInitOnlyOnce()
15
    {
16
        $object = new ObjectHasContainer();
17
        $object->initContainer();
18
19
        $object->getContainer()->set('test', 'myMalue');
20
21
        self::assertInstanceOf(Container::class, $object->getContainer());
22
        self::assertEquals('myMalue', $object->getContainer()->get('test'));
23
    }
24
}
25