mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
18 lines
755 B
PHP
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());
|