コード例 #1
0
ファイル: HistoryPrinter.php プロジェクト: rtens/mockster
 private function printResult(Call $call)
 {
     if ($call->thrown()) {
         $result = '!! ' . $this->toString($call->thrown());
         return $result;
     } else {
         $result = '-> ' . $this->toString($call->returned());
         return $result;
     }
 }
コード例 #2
0
ファイル: CallAssertion.php プロジェクト: rtens/mockster
 /**
  * @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()));
     }
 }