Beispiel #1
0
 public function testReplaceInstance()
 {
     $serviceManager = new CM_Service_Manager();
     $this->assertSame(false, $serviceManager->has('foo'));
     $serviceManager->replaceInstance('foo', 12.3);
     $this->assertSame(12.3, $serviceManager->get('foo'));
     $serviceManager->replaceInstance('foo', 12.4);
     $this->assertSame(12.4, $serviceManager->get('foo'));
 }