Skip to content
Snippets Groups Projects
Commit a1bc0a47 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2737781 by juampynr, cilefen, dawehner: Provide helpful message when...

Issue #2737781 by juampynr, cilefen, dawehner: Provide helpful message when attempting to run Javascript based test and PhantomJS is not running
parent 58268180
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
namespace Drupal\FunctionalJavascriptTests;
use Drupal\Tests\BrowserTestBase;
use Zumba\GastonJS\Exception\DeadClient;
use Zumba\Mink\Driver\PhantomJSDriver;
/**
......@@ -30,7 +31,16 @@ protected function initMink() {
if (!file_exists($path)) {
mkdir($path);
}
return parent::initMink();
try {
return parent::initMink();
}
catch (DeadClient $e) {
$this->markTestSkipped('PhantomJS is either not installed or not running. Start it via phantomjs --ssl-protocol=any --ignore-ssl-errors=true vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768&');
}
catch (Exception $e) {
$this->markTestSkipped('An unexpected error occurred while starting Mink: ' . $e->getMessage());
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment