]> git.mxchange.org Git - friendica.git/commitdiff
Fix test
authorMichael <heluecht@pirati.ca>
Fri, 17 Mar 2023 18:01:51 +0000 (18:01 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 17 Mar 2023 18:01:51 +0000 (18:01 +0000)
src/Factory/Api/Twitter/Status.php
tests/src/Content/Text/BBCodeTest.php
tests/src/Factory/Api/Twitter/StatusTest.php

index 810b421cab68868f28bec257d158c0fd76e19560..b4b4039f6a62e34e6012548f25c25d3a80345c54 100644 (file)
@@ -141,7 +141,7 @@ class Status extends BaseFactory
                // Add the title to text / html if set
                if (!empty($item['title'])) {
                        $text .= $item['title'] . ' ';
-                       $title = sprintf("[h4]%s[/h4]\n", $item['title']);
+                       $title = sprintf("[h4]%s[/h4]", $item['title']);
                }
 
                $statusnetHtml = BBCode::convertForUriId($item['uri-id'], BBCode::setMentionsToNicknames($title . ($item['raw-body'] ?? $item['body'])), BBCode::TWITTER_API);
index 82fdcc3cbed26db6de62f23da35409ce9ddc66cc..b289414cc6053f1d0e5dc9fa3ea2f90aaf57e8de 100644 (file)
@@ -259,7 +259,7 @@ Karl Marx - Die ursprüngliche Akkumulation
                                'text' => '[emoji=https://fedi.underscore.world/emoji/custom/custom/heart_nb.png]:heart_nb:[/emoji]',
                        ],
                        'task-12900-multiple-paragraphs' => [
-                               'expectedHTML' => '<h1>Header</h1><ul class="listbullet" style="list-style-type:circle;"><li>One</li><li>Two</li></ul><p>This is a paragraph<br>with a line feed.</p><p>Second Chapter</p>',
+                               'expectedHTML' => "<h1>Header</h1><ul class=\"listbullet\" style=\"list-style-type:circle;\"><li>One</li><li>Two</li></ul><p>This is a paragraph<br>with a line feed.</p><p>Second Chapter</p>",
                                'text' => '[h1]Header[/h1][ul][*]One[*]Two[/ul]\n\nThis is a paragraph\nwith a line feed.\n\nSecond Chapter',
                        ],
                        'task-12900-header-with-paragraphs' => [
index 88389458997d20c84de8bfa65347637708515e17..86b91deb366e8f49d734f23c97f0446a6f05b428 100644 (file)
@@ -64,7 +64,7 @@ class StatusTest extends FixtureTest
                        ->toArray();
 
                self::assertStringStartsWith('item_title', $status['text']);
-               self::assertStringStartsWith('<h4>item_title</h4><br>perspiciatis impedit voluptatem', $status['friendica_html']);
+               self::assertStringStartsWith('<h4>item_title</h4><p>perspiciatis impedit voluptatem', $status['friendica_html']);
        }
 
        /**