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