🆙 Final fix delete storage link to fix news_images and logs 🆙

This commit is contained in:
Remco
2026-01-07 20:29:24 +01:00
parent 65ea6c167f
commit acf2d7e661
447 changed files with 208 additions and 66965 deletions
-51
View File
@@ -1,51 +0,0 @@
<?php
namespace Tests;
use Database\Seeders\TestingSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\DB;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication, RefreshDatabase;
protected function refreshTestDatabase()
{
if (! RefreshDatabase::$migrated) {
// Create database if it doesn't exist
$this->createTestDatabase();
// Run migrations (including CoreSqlFile migration)
$this->artisan('migrate:fresh');
// Force TestingSeeder to run
$this->artisan('db:seed', ['--class' => TestingSeeder::class]);
RefreshDatabase::$migrated = true;
}
$this->beginDatabaseTransaction();
}
protected function createTestDatabase(): void
{
$database = config('database.connections.mariadb.database');
$connection = config('database.connections.mariadb');
// Connect to MariaDB without specifying database
$tempConnection = [
'driver' => 'mysql',
'host' => $connection['host'],
'port' => $connection['port'],
'username' => $connection['username'],
'password' => $connection['password'],
];
config(['database.connections.temp' => $tempConnection]);
DB::connection('temp')->statement("CREATE DATABASE IF NOT EXISTS `{$database}`");
DB::purge('temp');
}
}