Exemplo n.º 1
0
 /**
  * @param WebDriver $driver
  * @param WebDriverDispatcher $dispatcher
  */
 public function __construct(WebDriver $driver, WebDriverDispatcher $dispatcher = null)
 {
     $this->dispatcher = $dispatcher ?: new WebDriverDispatcher();
     if (!$this->dispatcher->getDefaultDriver()) {
         $this->dispatcher->setDefaultDriver($this);
     }
     $this->driver = $driver;
     return $this;
 }
Exemplo n.º 2
0
 private function dispatchOnException($exception)
 {
     $this->dispatch('onException', $exception, $this->dispatcher->getDefaultDriver());
     throw $exception;
 }