Release 2.16 (#4780)
This commit is contained in:
@@ -12,6 +12,9 @@ namespace App\Tests\Security;
|
||||
use App\Security\SessionHandler;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\RateLimiter\RateLimiterFactory;
|
||||
use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
|
||||
|
||||
/**
|
||||
* @covers \App\Security\SessionHandler
|
||||
@@ -20,7 +23,11 @@ class SessionHandlerTest extends TestCase
|
||||
{
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$sut = new SessionHandler($this->createMock(Connection::class));
|
||||
$sut = new SessionHandler(
|
||||
$this->createMock(Connection::class),
|
||||
new RateLimiterFactory(['id' => 'foo', 'policy' => 'sliding_window'], new InMemoryStorage()),
|
||||
new RequestStack(),
|
||||
);
|
||||
|
||||
self::assertFalse($sut->isSessionExpired());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user