original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: Returns Mink session with given browser configuration.
  
  @param BrowserConfiguration $browser Browser configuration for a session.
  
  @return Session
docstring_tokens: Returns Mink session with given browser configuration .