DEF STUDIO srl

Collections Expectations

toBeCollection()

Assert that the value is an instance of \Illuminate\Support\Collection.

expect(collect[1,2,3])->toBeCollection();

toBeEloquentCollection()

Assert that the value is an instance of \Illuminate\Database\Eloquent\Collection.

expect(User::all())->toBeEloquentCollection();
Suggest a change
Last updated 10 September 2024