public function testAll() { $text = new BBCodeFromDB("", $this->uid); $path = __DIR__ . "/bbcode_examples"; foreach (glob("{$path}/*.db.txt") as $dbFilePath) { $htmlFilePath = preg_replace("/\\.db\\.txt\$/", ".html", $dbFilePath); $text->text = trim(file_get_contents($dbFilePath)); $referenceHtmlOutput = $this->wrapDiv(trim(file_get_contents($htmlFilePath))); $this->assertEquals($referenceHtmlOutput, $text->toHTML()); } }