/**
  * FIXED https://github.com/giorgiosironi/phpunit-selenium/issues/261
  *
  * "Unable to set Cookie: no URL has been loaded yet"
  * 
  * @return unknown
  */
 public function prepareSession()
 {
     $res = parent::prepareSession();
     $res->cookie()->remove('PHPUNIT_SELENIUM_TEST_ID');
     $this->url('/');
     return $res;
 }
 public function prepareSession()
 {
     $res = parent::prepareSession();
     if (defined('PHPUNIT_SELENIUM_COVERAGE')) {
         $res->cookie()->remove('PHPUNIT_SELENIUM_TEST_ID');
         $this->url('/');
     }
     return $res;
 }
 /**
  * HACK for selenium error "Can only set Cookies for the current domain"
  *      when using phantomjs and generating code coverage
  */
 public function prepareSession()
 {
     $res = parent::prepareSession();
     $this->url('/');
     return $res;
 }
示例#4
0
 /**
  * Sets session with setting URL to workaround phpunit-selenium issue
  * https://github.com/sebastianbergmann/phpunit-selenium/issues/295
  *
  * @return session object
  */
 public function prepareSession()
 {
     $result = parent::prepareSession();
     if (!empty($GLOBALS['TESTSUITE_SELENIUM_COVERAGE'])) {
         $this->coverageScriptUrl = $GLOBALS['TESTSUITE_SELENIUM_COVERAGE'];
         $this->url($this->coverageScriptUrl);
     } else {
         $this->url('');
     }
     return $result;
 }