public function printFail(FailEvent $e) { $failedTest = $e->getTest(); $fail = $e->getFail(); $this->output->write($e->getCount() . ") "); if ($failedTest instanceof ScenarioDriven) { $this->printScenarioFail($failedTest, $fail); return; } $this->getTestMessage($failedTest)->write(); $this->printException($fail); $this->printExceptionTrace($fail); }
public function printFail(FailEvent $e) { $failedTest = $e->getTest(); $fail = $e->getFail(); $this->output->write($e->getCount() . ") "); $this->writeCurrentTest($failedTest, false); $this->output->writeln(''); $this->message("<error> Test </error> ")->append(codecept_relative_path(Descriptor::getTestFullName($failedTest)))->write(); if ($failedTest instanceof ScenarioDriven) { $this->printScenarioFail($failedTest, $fail); return; } $this->printException($fail); $this->printExceptionTrace($fail); }
public function printFail(FailEvent $e) { $failedTest = $e->getTest(); $fail = $e->getFail(); $this->output->write($e->getCount() . ") "); if ($e->getTest() instanceof ScenarioDriven) { $this->printScenarioFail($failedTest, $fail); return; } $failToString = \PHPUnit_Framework_TestFailure::exceptionToString($fail); $this->message(get_class($failedTest)) ->append('::') ->append($failedTest->getName()) ->style('bold') ->append("\n") ->append($failToString) ->writeln(); $this->printException($fail); }