| @@ 241-251 (lines=11) @@ | ||
| 238 | $this->lazyRegistry['baz'] = $this->createServiceMock(); |
|
| 239 | } |
|
| 240 | ||
| 241 | public function testOffsetUnset() |
|
| 242 | { |
|
| 243 | foreach (array_keys(array_merge($this->services, $this->lazyServices)) as $type) { |
|
| 244 | unset($this->lazyRegistry[$type]); |
|
| 245 | ||
| 246 | $this->assertFalse(isset($this->lazyRegistry[$type])); |
|
| 247 | } |
|
| 248 | ||
| 249 | $this->assertEmpty(iterator_to_array($this->lazyRegistry)); |
|
| 250 | $this->assertCount(0, $this->lazyRegistry); |
|
| 251 | } |
|
| 252 | ||
| 253 | /** |
|
| 254 | * @return ContainerInterface|\PHPUnit_Framework_MockObject_MockObject |
|
| @@ 124-134 (lines=11) @@ | ||
| 121 | $this->registry['baz'] = new \stdClass(); |
|
| 122 | } |
|
| 123 | ||
| 124 | public function testOffsetUnset() |
|
| 125 | { |
|
| 126 | foreach (array_keys($this->services) as $type) { |
|
| 127 | unset($this->registry[$type]); |
|
| 128 | ||
| 129 | $this->assertFalse(isset($this->registry[$type])); |
|
| 130 | } |
|
| 131 | ||
| 132 | $this->assertEmpty(iterator_to_array($this->registry)); |
|
| 133 | $this->assertCount(0, $this->registry); |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * @expectedException \Lug\Component\Registry\Exception\ServiceNotFoundException |
|