fix для работы с vmangos
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Tests\Feature;
|
||||
use App\Models\GameAccount;
|
||||
use App\Services\VMangosSrpService;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Tests\TestCase;
|
||||
@@ -39,6 +40,8 @@ class LauncherGameTicketFeatureTest extends TestCase
|
||||
|
||||
public function test_game_ticket_is_issued_and_replaces_previous_generation(): void
|
||||
{
|
||||
config(['moonwell.timezone' => 'Europe/Samara']);
|
||||
$this->travelTo(Carbon::parse('2026-10-04 12:00:00', 'UTC'));
|
||||
$account = new GameAccount;
|
||||
$account->id = 7;
|
||||
$account->username = 'PLAYERONE';
|
||||
@@ -49,6 +52,9 @@ class LauncherGameTicketFeatureTest extends TestCase
|
||||
$this->assertMatchesRegularExpression('/^[A-Z0-9]{16}$/', $first);
|
||||
$this->assertSame('PLAYERONE', $response->json('account'));
|
||||
$row = DB::connection('vmangos_auth')->table('launcher_ticket')->where('account_id', 7)->first();
|
||||
$this->assertSame('2026-10-04 12:00:00.000000', $row->issued_at);
|
||||
$this->assertSame('2026-10-04 12:01:00.000000', $row->expires_at);
|
||||
$this->assertSame('2026-10-04T12:01:00Z', $response->json('expires_at'));
|
||||
$this->assertTrue(app(VMangosSrpService::class)->credentialsMatch('PLAYERONE', $first, strtoupper(bin2hex($row->srp_salt)), strtoupper(bin2hex($row->srp_verifier))));
|
||||
$generation = $row->generation_id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user