public function testAddService()
 {
     $container = new Container();
     $container->set('log', function ($status, $message) {
         return sprintf('[%s]: %s', $status, $message);
     });
     $this->assertTrue($container->has('log'));
     $this->assertEquals('[info]: starting...', $container->get('log', array('info', 'starting...')));
 }
 /**
  * {@inheritdoc}
  */
 public function has($id)
 {
     if (false === parent::has($id)) {
         return $this->hasDefinition($id);
     }
     return true;
 }