refactor: use a Collection for attendees
This commit is contained in:
parent
aec86ad237
commit
133cc8c822
|
@ -3,17 +3,18 @@
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
use Tightenco\Collect\Support\Collection;
|
||||||
|
|
||||||
final class EventRepositoryTest extends KernelTestCase
|
final class EventRepositoryTest extends KernelTestCase
|
||||||
{
|
{
|
||||||
/** @test */
|
/** @test */
|
||||||
public function should_only_return_attendees_with_a_yes_rsvp(): void {
|
public function should_only_return_attendees_with_a_yes_rsvp(): void {
|
||||||
$attendees = [
|
$attendees = Collection::make([
|
||||||
['name' => 'Matthew Setter'],
|
['name' => 'Matthew Setter'],
|
||||||
['name' => 'Matthew Setter'],
|
['name' => 'Matthew Setter'],
|
||||||
['name' => 'Matthew Setter'],
|
['name' => 'Matthew Setter'],
|
||||||
];
|
]);
|
||||||
|
|
||||||
$this->assertCount(3, $attendees);
|
$this->assertCount(3, $attendees->pluck('name'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue