l10nMock)) { $this->l10nMock = \Mockery::mock('alias:' . L10n::class); } $with = isset($input) ? $input : \Mockery::any(); $return = isset($return) ? $return : $with; if ($return instanceof \Mockery\Matcher\Any) { $this->l10nMock ->shouldReceive('t') ->with($with) ->times($times) ->andReturnUsing(function($arg) { return $arg; }); } else { $this->l10nMock ->shouldReceive('t') ->with($with) ->times($times) ->andReturn($return); } } }