addRule(new HtmlDirValid()); $violations = $scanner->scan('

Paragraph

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

Arabic text

English

Auto

'); $this->assertCount(0, $violations); } }