This commit is contained in:
2026-10-03 14:33:08 +04:00
parent 6a73d760c4
commit 93a9442e1c
67 changed files with 941 additions and 698 deletions
+11 -8
View File
@@ -16,18 +16,18 @@ class LauncherRealmsFeatureTest extends TestCase
parent::setUp();
config([
'moonwell.auth_connection' => 'azerothcore_auth',
'moonwell.auth_connection' => 'vmangos_auth',
'moonwell.launcher.realm_status_cache' => 0,
'moonwell.launcher.realm_status_host' => null,
'database.connections.azerothcore_auth' => [
'database.connections.vmangos_auth' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
],
]);
DB::purge('azerothcore_auth');
DB::purge('vmangos_auth');
Schema::connection('azerothcore_auth')->create('realmlist', function (Blueprint $table): void {
Schema::connection('vmangos_auth')->create('realmlist', function (Blueprint $table): void {
$table->unsignedInteger('id')->primary();
$table->string('name');
$table->string('address');
@@ -36,13 +36,14 @@ class LauncherRealmsFeatureTest extends TestCase
$table->unsignedInteger('flag')->default(0);
$table->unsignedInteger('timezone')->default(0);
$table->float('population')->default(0);
$table->unsignedInteger('gamebuild')->default(12340);
$table->unsignedInteger('gamebuild_min')->default(5875);
$table->unsignedInteger('gamebuild_max')->default(5875);
});
}
public function test_launcher_can_get_realms_and_their_status_without_authentication(): void
{
DB::connection('azerothcore_auth')->table('realmlist')->insert([
DB::connection('vmangos_auth')->table('realmlist')->insert([
[
'id' => 1,
'name' => 'MoonWell',
@@ -52,7 +53,8 @@ class LauncherRealmsFeatureTest extends TestCase
'flag' => 0,
'timezone' => 4,
'population' => 0.5,
'gamebuild' => 12340,
'gamebuild_min' => 5875,
'gamebuild_max' => 5875,
],
[
'id' => 2,
@@ -63,7 +65,8 @@ class LauncherRealmsFeatureTest extends TestCase
'flag' => 0,
'timezone' => 4,
'population' => 0,
'gamebuild' => 12340,
'gamebuild_min' => 5875,
'gamebuild_max' => 5875,
],
]);
$this->mock(RealmStatusProbe::class, function (MockInterface $mock): void {