Example #1
0
 /**
  * @return bool
  * @throws \RuntimeException
  */
 public function isServerExist()
 {
     if (!$this->container->offsetExists('Server')) {
         throw new \RuntimeException('server must be set in container');
     }
     return true;
 }
 public function it_should_throw_exception_when_server_is_not_exist(ContainerInterface $container)
 {
     $container->offsetExists('Server')->willReturn(false);
     $this->shouldThrow('\\RuntimeException')->duringisServerExist();
 }