Working state

This commit is contained in:
julien
2026-03-16 09:25:44 +01:00
parent b5a728e669
commit fd3f608059
24 changed files with 249 additions and 502 deletions

View File

@@ -7,6 +7,7 @@ use App\Shared\Config;
use PHPUnit\Framework\TestCase;
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
final class ConfigTest extends TestCase
{
public function testGetTwigCacheReturnsFalseInDev(): void
@@ -22,25 +23,6 @@ final class ConfigTest extends TestCase
self::assertStringEndsWith('/var/cache/twig', $cachePath);
}
public function testGetDatabasePathReturnsExistingFilePathUnchanged(): void
{
$dbFile = dirname(__DIR__, 2).'/database/app.sqlite';
$dbDir = dirname($dbFile);
if (!is_dir($dbDir)) {
mkdir($dbDir, 0755, true);
}
if (!file_exists($dbFile)) {
touch($dbFile);
}
$path = Config::getDatabasePath();
self::assertSame($dbFile, $path);
self::assertFileExists($dbFile);
}
public function testGetDatabasePathCreatesDatabaseFileWhenMissing(): void
{
$dbFile = dirname(__DIR__, 2).'/database/app.sqlite';