* When provided default Mink driver class can't be instantiated.
*/
protected function getDefaultDriverInstance() {
- // Get default driver params from environment if availables.
- if ($arg_json = getenv('MINK_DRIVER_ARGS')) {
+ // Get default driver params from environment if available.
+ if ($arg_json = $this->getMinkDriverArgs()) {
$this->minkDefaultDriverArgs = json_decode($arg_json, TRUE);
}
- // Get and check default driver class from environment if availables.
+ // Get and check default driver class from environment if available.
if ($minkDriverClass = getenv('MINK_DRIVER_CLASS')) {
if (class_exists($minkDriverClass)) {
$this->minkDefaultDriverClass = $minkDriverClass;
}
}
+ /**
+ * Get the Mink driver args from an environment variable, if it is set. Can
+ * be overridden in a derived class so it is possible to use a different
+ * value for a subset of tests, e.g. the JavaScript tests.
+ *
+ * @return string|false
+ * The JSON-encoded argument string. False if it is not set.
+ */
+ protected function getMinkDriverArgs() {
+ return getenv('MINK_DRIVER_ARGS');
+ }
+
/**
* Provides a Guzzle middleware handler to log every response received.
*
if ($disable_gc) {
gc_enable();
}
+
+ // Ensure that the test is not marked as risky because of no assertions. In
+ // PHPUnit 6 tests that only make assertions using $this->assertSession()
+ // can be marked as risky.
+ $this->addToAssertionCount(1);
}
/**