示例#1
0
 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);
 }
示例#2
0
 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);
 }
示例#3
0
    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);
    }