Working state

This commit is contained in:
julien
2026-03-16 09:46:48 +01:00
parent fd3f608059
commit e24ee5d622
5 changed files with 178 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Tests\Shared;
use App\Shared\Http\FlashService;
use PHPUnit\Framework\TestCase;
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
final class FlashServiceCoverageTest extends TestCase
{
protected function setUp(): void
{
$_SESSION = [];
}
public function testGetCastsFalseToEmptyString(): void
{
$_SESSION['flash']['flag'] = false;
$flash = new FlashService();
self::assertSame('', $flash->get('flag'));
self::assertArrayNotHasKey('flag', $_SESSION['flash']);
}
}