private function printResult(Call $call) { if ($call->thrown()) { $result = '!! ' . $this->toString($call->thrown()); return $result; } else { $result = '-> ' . $this->toString($call->returned()); return $result; } }
/** * @param mixed $value The expected returned value * @throws AssertionFailedException If returned value is not $value */ public function returned($value) { if ($value != $this->call->returned()) { throw new AssertionFailedException($this->methodCall . ' did not return ' . ValuePrinter::serialize($value) . "\n" . ' The returned value was ' . ValuePrinter::serialize($this->call->returned())); } }