1 | <?php |
||
10 | class ContainerBuilderTest extends \PHPUnit_Framework_TestCase { |
||
11 | |||
12 | /** |
||
13 | * @var ContainerBuilder |
||
14 | */ |
||
15 | protected $object; |
||
16 | |||
17 | /** |
||
18 | * Sets up the fixture, for example, opens a network connection. |
||
19 | * This method is called before a test is executed. |
||
20 | */ |
||
21 | protected function setUp() { |
||
24 | |||
25 | /** |
||
26 | */ |
||
27 | public function testClassDefinition() { |
||
28 | $container = $this->object->execute(__DIR__ .'/../test-di.xml'); |
||
29 | $this->assertInstanceOf('Fwk\Di\Container', $container); |
||
30 | $this->assertTrue($container->has('myObj')); |
||
31 | $this->assertInstanceOf(ClassDefinition::class, $container->get('myObj')); |
||
32 | $this->assertEquals($container->get('myObj'), $container->get('myObj')); |
||
33 | $this->assertTrue($container->getDefinition('myObj')->isShared()); |
||
34 | $this->assertArrayHasKey('testData', $container->getDefinition('myObj')->getData()); |
||
35 | } |
||
36 | |||
37 | public function testDefinition() { |
||
45 | |||
46 | /** |
||
47 | */ |
||
48 | public function testMapGetterAndSetter() { |
||
53 | |||
54 | public function testIniProperty() |
||
61 | |||
62 | public function testIniPropertyInArrayDefinition() |
||
71 | |||
72 | public function testListeners() |
||
85 | } |
||
86 |