laracasts / TestDummy

Easy factories for PHP integration testing.
https://laracasts.com/lessons/whats-new-in-testdummy
MIT License
456 stars 80 forks source link

Use Illuminate\Support\Collection when creaing multiple entities #35

Closed MarkRedeman closed 9 years ago

MarkRedeman commented 10 years ago

Sine you're already requiring Illuminate\Support, why not use its Collection class?

This way we do stuff like:

$expected = Faker::times(10)->create('User');

$users = User::all();

$this->assertEquals($users->toArray(), $expected->toArray());
laracasts commented 9 years ago

I'm going to tag this idea for the next big release.

laracasts commented 9 years ago

Done.