]> git.mxchange.org Git - friendica.git/commitdiff
Fix tests
authorMichael <heluecht@pirati.ca>
Fri, 17 Mar 2023 06:55:38 +0000 (06:55 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 17 Mar 2023 06:55:38 +0000 (06:55 +0000)
tests/src/Content/Text/BBCodeTest.php
tests/src/Factory/Api/Twitter/DirectMessageTest.php

index 4c1292344c1c5fee714affd5b142953c12b1b076..073a441f04e00420221ac3dad8c9fbe12aebaae0 100644 (file)
@@ -146,7 +146,7 @@ class BBCodeTest extends FixtureTest
        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 {
@@ -278,7 +278,7 @@ Karl Marx - Die ursprüngliche Akkumulation
        {
                $actual = BBCode::convert($text, $try_oembed, $simpleHtml, $forPlaintext);
 
-               self::assertEquals($expectedHtml, $actual);
+               self::assertEquals('<p>' . $expectedHtml . '</p>', $actual);
        }
 
        public function dataBBCodesToMarkdown()
index 216c4051fafff6dd1d4fe2ab6e1d57fede819aba..62a9c43e59d744d43ae392e8f2a1cc50b1910d2a 100644 (file)
@@ -67,7 +67,7 @@ class DirectMessageTest extends FixtureTest
                        ->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']);
        }
 
        /**