It only does "second pass" parsing of phpbb-preprocessed bbcode. Nothing in this class does any kind of checking because it should be already done by phpbb.
Пример #1
0
 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());
     }
 }