/** * Make a result hash * @param string $result result type * @param string $desc result description * @param array $other optional other parameters to include * @return FMHash hashed result */ public function make($result, $desc = null, $other = []) { return $this->hasher->hash(array_merge(['Result' => $result, 'ResultDescription' => $desc], $other)); }
function it_returns_an_unknown_error_on_falsey_values(FMHash $hasher) { $hasher->hash(['Result' => 'Error', 'ResultDescription' => 'unknown error'])->shouldBeCalled(); $this->error(false); }