Knp\Bundle\KnpBundlesBundle\Features\Context\FeatureContext::printLastResponseOnError PHP Метод

printLastResponseOnError() публичный Метод

public printLastResponseOnError ( Behat\Behat\Event\ScenarioEvent $scenarioEvent )
$scenarioEvent Behat\Behat\Event\ScenarioEvent
    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();
        }
    }