ThirdGameAgentPlayerIdTest.php 660 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Tests\Unit;
  3. use App\Services\ThirdGameBalanceService;
  4. use InvalidArgumentException;
  5. use PHPUnit\Framework\TestCase;
  6. class ThirdGameAgentPlayerIdTest extends TestCase
  7. {
  8. public function test_agent_player_id_uses_agent_primary_key(): void
  9. {
  10. $service = new ThirdGameBalanceService();
  11. $this->assertSame('a1', $service->agentPlayerId(1));
  12. $this->assertSame('a483', $service->agentPlayerId(483));
  13. }
  14. public function test_agent_player_id_rejects_non_positive_id(): void
  15. {
  16. $this->expectException(InvalidArgumentException::class);
  17. (new ThirdGameBalanceService())->agentPlayerId(0);
  18. }
  19. }