/** * @test * @expectedException \InvalidArgumentException */ function it_throw_an_exception_if_the_callback_for_custom_queries_is_incorrect() { $this->repository->allCallback(function () { return 'incorrect return value'; }); }