@@ 187-196 (lines=10) @@ | ||
184 | $this->assertEquals(array($binding3), $discovery->getBindings()); |
|
185 | } |
|
186 | ||
187 | public function testRemoveBindingsWithTypeDoesNothingIfNoneFound() |
|
188 | { |
|
189 | $discovery = $this->createDiscovery(); |
|
190 | $discovery->addBindingType(new BindingType(Foo::clazz, self::STRING_BINDING)); |
|
191 | $discovery->removeBindings(Foo::clazz); |
|
192 | ||
193 | $discovery = $this->loadDiscoveryFromStorage($discovery); |
|
194 | ||
195 | $this->assertCount(0, $discovery->getBindings()); |
|
196 | } |
|
197 | ||
198 | public function testRemoveBindingsWithTypeDoesNothingIfTypeNotFound() |
|
199 | { |
|
@@ 283-293 (lines=11) @@ | ||
280 | $this->assertCount(0, $discovery->getBindings()); |
|
281 | } |
|
282 | ||
283 | public function testAddBindingType() |
|
284 | { |
|
285 | $type = new BindingType(Foo::clazz, self::STRING_BINDING); |
|
286 | ||
287 | $discovery = $this->createDiscovery(); |
|
288 | $discovery->addBindingType($type); |
|
289 | ||
290 | $discovery = $this->loadDiscoveryFromStorage($discovery); |
|
291 | ||
292 | $this->assertEquals($type, $discovery->getBindingType(Foo::clazz)); |
|
293 | } |
|
294 | ||
295 | public function testAddBindingTypeAfterReadingStorage() |
|
296 | { |