public function testGetServiceIds()
 {
     $sc = new Container();
     $sc->setService('foo', $obj = new \stdClass());
     $sc->setService('bar', $obj = new \stdClass());
     $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids');
     $sc = new ProjectServiceContainer();
     $this->assertEquals(spl_object_hash($sc->__bar), spl_object_hash($sc->getService('bar')), '->getService() looks for a getXXXService() method');
     $this->assertTrue($sc->hasService('bar'), '->hasService() returns true if the service has been defined as a getXXXService() method');
     $sc->setService('bar', $bar = new \stdClass());
     $this->assertEquals(spl_object_hash($sc->getService('bar')), spl_object_hash($bar), '->getService() prefers to return a service defined with a getXXXService() method than one defined with setService()');
     try {
         $sc->getService('baba');
         $this->fail('->getService() thrown an \\InvalidArgumentException if the service does not exist');
     } catch (\Exception $e) {
         $this->assertInstanceOf('\\InvalidArgumentException', $e, '->getService() thrown an \\InvalidArgumentException if the service does not exist');
         $this->assertEquals('The service "baba" does not exist.', $e->getMessage(), '->getService() thrown an \\InvalidArgumentException if the service does not exist');
     }
     try {
         $sc->baba;
         $this->fail('->__get() thrown an \\InvalidArgumentException if the service does not exist');
     } catch (\Exception $e) {
         $this->assertInstanceOf('\\InvalidArgumentException', $e, '->__get() thrown an \\InvalidArgumentException if the service does not exist');
         $this->assertEquals('The service "baba" does not exist.', $e->getMessage(), '->__get() thrown an \\InvalidArgumentException if the service does not exist');
     }
     try {
         unset($sc->baba);
         $this->fail('->__unset() thrown an LogicException if you try to remove a service');
     } catch (\Exception $e) {
         $this->assertInstanceOf('\\LogicException', $e, '->__unset() thrown an LogicException if you try to remove a service');
         $this->assertEquals('You can\'t unset a service.', $e->getMessage(), '->__unset() thrown an LogicException if you try to remove a service');
     }
     $this->assertEquals(spl_object_hash($sc->__foo_bar), spl_object_hash($sc->getService('foo_bar')), '->getService() camelizes the service id when looking for a method');
     $this->assertEquals(spl_object_hash($sc->__foo_baz), spl_object_hash($sc->getService('foo.baz')), '->getService() camelizes the service id when looking for a method');
 }