finished the upgrade to filament 4. completely revamped the frontend with codex, now it looks great!

This commit is contained in:
2025-11-13 17:42:43 +01:00
parent f59fda588b
commit b311188bc1
138 changed files with 5440 additions and 4105 deletions

View File

@@ -3,8 +3,58 @@
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\File;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
protected string $testingDatabasePath;
protected static bool $databaseMigrated = false;
protected function setUp(): void
{
parent::setUp();
if (app()->environment('production')) {
$this->fail('Refusing to run tests against the production environment.');
}
$this->testingDatabasePath = storage_path('framework/testing/test-database.sqlite');
File::ensureDirectoryExists(dirname($this->testingDatabasePath));
if (! file_exists($this->testingDatabasePath)) {
touch($this->testingDatabasePath);
}
config([
'database.default' => 'sqlite',
'database.connections.sqlite.database' => $this->testingDatabasePath,
]);
if (! static::$databaseMigrated) {
Artisan::call('migrate', [
'--database' => 'sqlite',
'--force' => true,
]);
static::$databaseMigrated = true;
}
}
public static function tearDownAfterClass(): void
{
parent::tearDownAfterClass();
$testingDatabasePath = storage_path('framework/testing/test-database.sqlite');
if (file_exists($testingDatabasePath)) {
unlink($testingDatabasePath);
}
static::$databaseMigrated = false;
}
}