/**
* Initializes Mink sessions.
*/
protected function initMink() { $driver =
$this->
getDefaultDriverInstance();
if ($driver instanceof BrowserKitDriver
) { // Turn off curl timeout. Having a timeout is not a problem in a normal
// test running, but it is a problem when debugging. Also, disable SSL
// peer verification so that testing under HTTPS always works.
/** @var \GuzzleHttp\Client $client */
$client =
$this->container->
get('http_client_factory'
)->
fromOptions([ 'timeout' => NULL,
'verify' => FALSE,
]);
// Inject a Guzzle middleware to generate debug output for every request
// performed in the test.
$handler_stack =
$client->
getConfig('handler'
);
$handler_stack->
push($this->
getResponseLogHandler());
$driver->
getClient()->
setClient($client);
}