protected function printDefect(\PHPUnit_Framework_TestFailure $defect, $count)
{
$failedTest = $defect->failedTest();
if (!$failedTest instanceof \Codeception\TestCase) {
return parent::printDefect($defect, $count);
}
$this->dispatcher->dispatch('fail.print', new \Codeception\Event\Fail($defect->failedTest(), $defect->thrownException()));
}