/** * {@inheritdoc} */ public function getResultCode() { if ($this->callResult->hasException() && $this->callResult->getException() instanceof PendingException) { return self::PENDING; } if ($this->callResult->hasException()) { return self::FAILED; } return self::PASSED; }
/** * Returns tester result status. * * @return integer */ public function getResultCode() { if (null === $this->callResult) { return static::SKIPPED; } if ($this->callResult->getException() instanceof PendingException) { return static::PENDING; } if ($this->callResult->hasException()) { return static::FAILED; } return static::PASSED; }
/** * Prints hook call exception (if has some). * * @param OutputPrinter $printer * @param CallResult $callResult * @param string $indentText */ private function printHookCallException(OutputPrinter $printer, CallResult $callResult, $indentText) { if (!$callResult->hasException()) { return; } $pad = function ($l) use($indentText) { return sprintf('%s╳ {+exception}%s{-exception}', $indentText, $l); }; $exception = $this->exceptionPresenter->presentException($callResult->getException()); $printer->writeln(implode("\n", array_map($pad, explode("\n", $exception)))); $printer->writeln(sprintf('%s│', $indentText)); }