test auth middleware
This commit is contained in:
parent
34e26f81f5
commit
19d930b7e8
4 changed files with 325 additions and 0 deletions
18
backend/tests/Fakes/FakeClock.php
Normal file
18
backend/tests/Fakes/FakeClock.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Fakes;
|
||||
|
||||
use App\Auth\Clock;
|
||||
use DateTimeImmutable;
|
||||
|
||||
class FakeClock implements Clock
|
||||
{
|
||||
public function __construct(
|
||||
private DateTimeImmutable $currentTime,
|
||||
) {}
|
||||
|
||||
public function now(): DateTimeImmutable
|
||||
{
|
||||
return $this->currentTime;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue