addRule(new TableHeadersAttributeValid()); $violations = $scanner->scan('
Header 1
Cell
'); $this->assertCount(1, $violations); $this->assertSame('WCAG_1_3_1_TABLE_HEADERS_ATTR', $violations[0]->ruleId); } public function testPassesValidHeaderId(): void { $scanner = new Scanner(); $scanner->addRule(new TableHeadersAttributeValid()); $violations = $scanner->scan('
Header 1
Cell
'); $this->assertCount(0, $violations); } }