public function testAutoLinking(string $data, bool $assertHTML)
{
$output = BBCode::convert($data);
- $assert = $this->HTMLPurifier->purify('<a href="' . $data . '" target="_blank" rel="noopener noreferrer">' . $data . '</a>');
+ $assert = $this->HTMLPurifier->purify('<p><a href="' . $data . '" target="_blank" rel="noopener noreferrer">' . $data . '</a></p>');
if ($assertHTML) {
self::assertEquals($assert, $output);
} else {
{
$actual = BBCode::convert($text, $try_oembed, $simpleHtml, $forPlaintext);
- self::assertEquals($expectedHtml, $actual);
+ self::assertEquals('<p>' . $expectedHtml . '</p>', $actual);
}
public function dataBBCodesToMarkdown()
->toArray();
self::assertEquals('item_title', $directMessage['title']);
- self::assertEquals('<strong>item_body</strong>', $directMessage['text']);
+ self::assertEquals('<p><strong>item_body</strong></p>', $directMessage['text']);
}
/**