/**
  * Returns Mink session with given browser configuration.
  *
  * @param BrowserConfiguration $browser Browser configuration for a session.
  *
  * @return Session
  */
 public function session(BrowserConfiguration $browser)
 {
     if ($this->_lastTestFailed) {
         $this->stopSession();
         $this->_lastTestFailed = false;
     }
     if ($this->_session === null) {
         $this->_session = $this->_originalStrategy->session($browser);
     } else {
         $this->_switchToMainWindow();
     }
     return $this->_session;
 }
 /**
  * Configures all tests.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->eventDispatcher = new EventDispatcher();
     $this->strategy->setEventDispatcher($this->eventDispatcher);
 }