assertSame(12, $challenge->maxAttempts); } public function test_dto_defaults_max_attempts_to_zero(): void { // 기본값 0 — popup/SDK 형 provider (이니시스 등) 가 named args 로 호출 시 별도 지정 없이도 동작 $challenge = new VerificationChallenge( id: 'uuid-2', providerId: 'inicis', purpose: 'signup', channel: 'ipin', targetHash: hash('sha256', 'user@example.com'), expiresAt: Carbon::now(), renderHint: 'text_code', ); $this->assertSame(0, $challenge->maxAttempts); } public function test_to_array_exposes_max_attempts_key(): void { $challenge = new VerificationChallenge( id: 'uuid-3', providerId: 'g7:core.mail', purpose: 'signup', channel: 'email', targetHash: hash('sha256', 'a@b.com'), expiresAt: Carbon::parse('2026-05-14T11:00:00+00:00'), renderHint: 'text_code', maxAttempts: 7, ); $arr = $challenge->toArray(); $this->assertArrayHasKey('max_attempts', $arr); $this->assertSame(7, $arr['max_attempts']); } }