else { throw new \
InvalidArgumentException("Can't instantiate provided
$minkDriverClass class by environment as default driver class."
);
} } if ($this->minkDefaultDriverClass === BrowserKitDriver::
class) { $driver =
new $this->
minkDefaultDriverClass(new DrupalTestBrowser());
} elseif (is_array($this->minkDefaultDriverArgs
)) { // Use ReflectionClass to instantiate class with received params.
$reflector =
new \
ReflectionClass($this->minkDefaultDriverClass
);
$driver =
$reflector->
newInstanceArgs($this->minkDefaultDriverArgs
);
} else { $driver =
new $this->
minkDefaultDriverClass();
} return $driver;
} /**
* Gets the Mink driver args from an environment variable.
*
* The environment variable 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.
*/