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();
Edit this page
Last updated 10 September 2024