addRule(new AriaRedundantRole()); $violations = $scanner->scan('
'); $this->assertCount(1, $violations); $this->assertSame('WCAG_4_1_2_ARIA_REDUNDANT_ROLE', $violations[0]->ruleId); } public function testPassesNavWithoutRedundantRole(): void { $scanner = new Scanner(); $scanner->addRule(new AriaRedundantRole()); $violations = $scanner->scan(''); $this->assertCount(0, $violations); } }