function let($unwrapper, $presenter) { $unwrapper->unwrapAll(ANY_ARGUMENTS)->willReturnUsing(function ($arguments) { if (!is_array($arguments[0])) { $arguments[0] = $arguments[0]->getWrappedSubject(); } return $arguments; }); $presenter->presentValue(ANY_ARGUMENTS)->willReturn('val1'); $presenter->presentValue(ANY_ARGUMENTS)->willReturn('val2'); $this->beConstructedWith($unwrapper, $presenter); }