Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Merge [4584].

  • Loading branch information...
commit 43852ecc39cbecf3204ac06246ca5fee1d423582 1 parent ed95239
Sebastian Bergmann authored
23 PHPUnit/Extensions/SeleniumTestCase.php
View
@@ -354,10 +354,25 @@ protected function runTest()
{
$this->start();
- if (!is_file($this->name)) {
- parent::runTest();
- } else {
- $this->runSelenese($this->name);
+ try {
+ if (!is_file($this->name)) {
+ parent::runTest();
+ } else {
+ $this->runSelenese($this->name);
+ }
+ }
+
+ catch (PHPUnit_Framework_ExpectationFailedException $e) {
+ $buffer = 'Current URL: ' . $this->drivers[0]->getLocation() . "\n";
+ $message = $e->getCustomMessage();
+
+ if (!empty($message)) {
+ $buffer .= "\n" . $message;
+ }
+
+ $e->setCustomMessage($buffer);
+
+ throw $e;
}
if ($this->autoStop) {
8 PHPUnit/Framework/ExpectationFailedException.php
View
@@ -100,6 +100,14 @@ public function getCustomMessage()
{
return $this->customMessage;
}
+
+ /**
+ * @since Method available since Release 3.4.0
+ */
+ public function setCustomMessage($customMessage)
+ {
+ $this->customMessage = $customMessage;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.