wip: initial class setup
This commit is contained in:
parent
06f764a188
commit
2962800349
10
src/AttendeeLoader.php
Normal file
10
src/AttendeeLoader.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
interface AttendeeLoader
|
||||||
|
{
|
||||||
|
public function getAttendees(): Collection;
|
||||||
|
}
|
8
src/EventRepository.php
Normal file
8
src/EventRepository.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
interface EventRepository
|
||||||
|
{
|
||||||
|
public function getConfirmedAttendees(): array;
|
||||||
|
}
|
13
tests/EventRepositoryTest.php
Normal file
13
tests/EventRepositoryTest.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Tests;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
|
||||||
|
final class EventRepositoryTest extends KernelTestCase
|
||||||
|
{
|
||||||
|
/** @test */
|
||||||
|
public function should_only_return_attendees_with_a_yes_rsvp(): array {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
14
tests/FakeEventRepository.php
Normal file
14
tests/FakeEventRepository.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Tests;
|
||||||
|
|
||||||
|
use App\EventRepository;
|
||||||
|
|
||||||
|
final class FakeEventRepository implements EventRepository
|
||||||
|
{
|
||||||
|
public function getConfirmedAttendees(): array {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue