/** * @throws RuntimeException */ protected function runTest() { $this->prepareSession(); $thrownException = NULL; if ($this->collectCodeCoverageInformation) { $this->session->cookie()->remove('PHPUNIT_SELENIUM_TEST_ID'); $this->session->cookie()->add('PHPUNIT_SELENIUM_TEST_ID', $this->testId)->set(); } try { $result = parent::runTest(); if (!empty($this->verificationErrors)) { $this->fail(implode("\n", $this->verificationErrors)); } } catch (Exception $e) { $thrownException = $e; } if (NULL !== $thrownException) { throw $thrownException; } return $result; }
/** * @throws RuntimeException */ protected function runTest() { $this->prepareSession(); $thrownException = NULL; if ($this->collectCodeCoverageInformation) { $this->url($this->coverageScriptUrl); // phpunit_coverage.php won't do anything if the cookie isn't set, which is exactly what we want $this->session->cookie()->add('PHPUNIT_SELENIUM_TEST_ID', $this->testId)->set(); } try { $this->setUpPage(); $result = parent::runTest(); if (!empty($this->verificationErrors)) { $this->fail(implode("\n", $this->verificationErrors)); } } catch (Exception $e) { $thrownException = $e; } if ($this->collectCodeCoverageInformation) { $this->session->cookie()->remove('PHPUNIT_SELENIUM_TEST_ID'); } if (NULL !== $thrownException) { throw $thrownException; } return $result; }