assertSame(12, $service->minLength()); $hints = $service->hints(); $this->assertNotEmpty($hints); $this->assertSame('min', (string) ($hints[0]['rule'] ?? '')); } public function testValidateRejectsWeakPassword(): void { $service = new UserPasswordPolicyService(); $errors = $service->validate('abc', 'abc', true, 'foo@example.com'); $this->assertNotEmpty($errors); } }