id = 7; $account->username = 'PLAYERONE'; Passport::actingAs($account); $this->mock(BalanceService::class, function (MockInterface $mock): void { $mock->shouldReceive('balance') ->once() ->with(7) ->andReturn('1250.00'); }); $this->getJson('/api/launcher/account') ->assertOk() ->assertExactJson([ 'username' => 'PLAYERONE', 'balance' => '1250.00', ]); } public function test_launcher_account_endpoint_requires_authentication(): void { $this->getJson('/api/launcher/account') ->assertUnauthorized(); } }