Completed
Push — master ( 578aad...f9ef01 )
by Gabriel
05:28 queued 10s
created

ContainerAwareTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCheckInitOnlyOnce() 0 8 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->getContainer()->set('test', 'value');
18
19
        self::assertInstanceOf(Container::class, $object->getContainer());
20
        self::assertEquals('value', $object->getContainer()->get('test'));
21
    }
22
}
23