first commit

This commit is contained in:
julien
2026-03-20 22:13:41 +01:00
commit 41f8b3afb4
323 changed files with 27222 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace Tests\Kernel;
use Netig\Netslim\Kernel\Http\Infrastructure\Session\SessionManager;
use PHPUnit\Framework\TestCase;
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
final class SessionManagerCoverageTest extends TestCase
{
private SessionManager $manager;
protected function setUp(): void
{
$_SESSION = [];
$this->manager = new SessionManager();
}
protected function tearDown(): void
{
$_SESSION = [];
}
public function testGetUserIdCastsNumericStringToInteger(): void
{
$_SESSION['user_id'] = '42';
self::assertSame(42, $this->manager->getUserId());
self::assertTrue($this->manager->isAuthenticated());
}
}