Exemplo n.º 1
0
 /**
  * @param EventBaseInterface $base
  * @depends testBaseInit
  *
  * @return EventBase
  */
 public function testBaseException(EventBaseInterface $base)
 {
     $exception = new EventException();
     $this->assertInstanceOf('Libevent\\Exception\\EventException', $exception->setBase($base));
     $this->assertInstanceOf('Libevent\\Base\\EventBaseInterface', $exception->getBase());
     return $base;
 }
Exemplo n.º 2
0
 /**
  * Prepare exception for specified base
  * For php >= 5.4 will be nice
  * return (new EventException($message, EventException::BASE_EXCEPTION))->setBase($this);
  *
  * @param string $message
  *
  * @return EventException
  */
 protected function exception($message)
 {
     $exception = new EventException($message, EventException::BASE_EXCEPTION);
     return $exception->setBase($this);
 }