/** * @test */ function it_can_perform_find_and_all_lookups_with_a_callback_for_custom_queries() { // allCallback $result = $this->repository->allCallback(function ($query) { return $query->where(self::UNIQUE_FIELD, '1337'); }); $this->assertCount(1, $result, "Wrong count for allCallback()"); // findCallback $result = $this->repository->findCallback(function ($query) { return $query->where(self::UNIQUE_FIELD, '1337'); }); $this->assertEquals('1337', $result->{self::UNIQUE_FIELD}, "Wrong result for findCallback()"); }