Files
pterodactyl-panel/tests/Unit/Database/SchemaDumpTest.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

18 lines
755 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Tests\Pest\Unit\Database\SchemaDumpTest;
use Illuminate\Support\Facades\File;
use Pterodactyl\Tests\TestCase;
uses(TestCase::class);
test('every mysql family connection loads the same schema dump on a fresh install', function (string $connection): void {
expect(database_path("schema/{$connection}-schema.sql"))->toBeFile()
->and(File::get(database_path("schema/{$connection}-schema.sql")))->toBe(File::get(database_path('schema/mysql-schema.sql')));
})->with(fn (): array => collect((require dirname(__DIR__, 3).'/config/database.php')['connections'])
->filter(fn (array $connection): bool => in_array($connection['driver'], ['mysql', 'mariadb'], true))
->keys()
->all());