LazyClassDefinitionTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Fwk\Di\Definitions;
4
use Fwk\Di\Container;
5
6
/**
7
 * Test class for ClassDefinition.
8
 */
9
class LazyClassDefinitionTest extends \PHPUnit_Framework_TestCase {
10
11
    /**
12
     * @var ClassDefinition
13
     */
14
    protected $object;
15
16
    /**
17
     * Sets up the fixture, for example, opens a network connection.
18
     * This method is called before a test is executed.
19
     */
20
    protected function setUp()
21
    {
22
        $this->object = new LazyClassDefinition('\stdClass');
23
        
24
    }
25
    
26
    protected function getContainer()
27
    {
28
        $container = new Container();
29
30
        return $container;
31
    }
32
    
33
   public function testLazyClassLoading()
34
   {
35
       $class = $this->object->invoke($this->getContainer());
36
       $this->assertArrayHasKey('ProxyManager\Proxy\LazyLoadingInterface', class_implements($class));
37
   }
38
}