| @@ 109-124 (lines=16) @@ | ||
| 106 | $loader->populate($container, $config); |
|
| 107 | } |
|
| 108 | ||
| 109 | public function testAddingConcrete() |
|
| 110 | { |
|
| 111 | $loader = new ContainerHydrator(); |
|
| 112 | ||
| 113 | $config = [ |
|
| 114 | 'TestInterface' => null, |
|
| 115 | ]; |
|
| 116 | ||
| 117 | $container = $this->getContainerMock(); |
|
| 118 | ||
| 119 | $container->expects($this->once()) |
|
| 120 | ->method('add') |
|
| 121 | ->with('TestInterface', null, false); |
|
| 122 | ||
| 123 | $loader->populate($container, $config); |
|
| 124 | } |
|
| 125 | ||
| 126 | public function testSharingConcrete() |
|
| 127 | { |
|
| @@ 126-143 (lines=18) @@ | ||
| 123 | $loader->populate($container, $config); |
|
| 124 | } |
|
| 125 | ||
| 126 | public function testSharingConcrete() |
|
| 127 | { |
|
| 128 | $loader = new ContainerHydrator(); |
|
| 129 | ||
| 130 | $config = [ |
|
| 131 | 'TestInterface' => [ |
|
| 132 | 'share' => true, |
|
| 133 | ], |
|
| 134 | ]; |
|
| 135 | ||
| 136 | $container = $this->getContainerMock(); |
|
| 137 | ||
| 138 | $container->expects($this->once()) |
|
| 139 | ->method('add') |
|
| 140 | ->with('TestInterface', null, true); |
|
| 141 | ||
| 142 | $loader->populate($container, $config); |
|
| 143 | } |
|
| 144 | ||
| 145 | public function testAddingAlias() |
|
| 146 | { |
|