| @@ 92-107 (lines=16) @@ | ||
| 89 | $loader->populate($container, new stdClass()); |
|
| 90 | } |
|
| 91 | ||
| 92 | public function testAddingScalar() |
|
| 93 | { |
|
| 94 | $loader = new ContainerHydrator(); |
|
| 95 | ||
| 96 | $config = [ |
|
| 97 | 'key' => 'value', |
|
| 98 | ]; |
|
| 99 | ||
| 100 | $container = $this->getContainerMock(); |
|
| 101 | ||
| 102 | $container->expects($this->once()) |
|
| 103 | ->method('add') |
|
| 104 | ->with('key', 'value', false); |
|
| 105 | ||
| 106 | $loader->populate($container, $config); |
|
| 107 | } |
|
| 108 | ||
| 109 | public function testAddingConcrete() |
|
| 110 | { |
|
| @@ 145-160 (lines=16) @@ | ||
| 142 | $loader->populate($container, $config); |
|
| 143 | } |
|
| 144 | ||
| 145 | public function testAddingAlias() |
|
| 146 | { |
|
| 147 | $loader = new ContainerHydrator(); |
|
| 148 | ||
| 149 | $config = [ |
|
| 150 | 'TestInterface' => 'Test', |
|
| 151 | ]; |
|
| 152 | ||
| 153 | $container = $this->getContainerMock(); |
|
| 154 | ||
| 155 | $container->expects($this->once()) |
|
| 156 | ->method('add') |
|
| 157 | ->with('TestInterface', 'Test', false); |
|
| 158 | ||
| 159 | $loader->populate($container, $config); |
|
| 160 | } |
|
| 161 | ||
| 162 | public function testAddingShared() |
|
| 163 | { |
|