Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not show page if exception's not from Mink

  • Loading branch information...
commit f98a3092ac28f5d3c91d1efd5f039cc037f22ee5 1 parent 1b68c73
@everzet everzet authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/Behat/MinkExtension/Listener/FailureShowListener.php
View
5 src/Behat/MinkExtension/Listener/FailureShowListener.php
@@ -7,6 +7,7 @@
use Behat\Behat\Event\StepEvent;
use Behat\Mink\Mink;
+use Behat\Mink\Exception\Exception as MinkException;
/*
* This file is part of the Behat\MinkExtension.
@@ -79,6 +80,10 @@ public function showFailedStepResponse($event)
if (StepEvent::FAILED !== $event->getResult()) {
return;
}
+
+ if (!$event->getException() instanceof MinkException) {
+ return;
+ }
if (null === $this->parameters['show_cmd']) {
throw new \RuntimeException('Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: open %s")');
Please sign in to comment.
Something went wrong with that request. Please try again.