Working state
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user