public function printLastResponseOnError(ScenarioEvent $scenarioEvent)
{
if ($scenarioEvent->getResult() != 0) {
// avoid the error if we're using Goutte and there has been no request yet
if ($this->getSession()->getDriver() instanceof GoutteDriver && !$this->getSession()->getDriver()->getClient()->getRequest()) {
return;
}
// uncomment to better scenario debug
//$this->getSubcontext('mink')->printLastResponse();
}
}