From e55f38cc981ce1f8b80e9f9d9a61487f5395b5c3 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 17 Mar 2023 18:01:51 +0000 Subject: [PATCH] Fix test --- src/Factory/Api/Twitter/Status.php | 2 +- tests/src/Content/Text/BBCodeTest.php | 2 +- tests/src/Factory/Api/Twitter/StatusTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Factory/Api/Twitter/Status.php b/src/Factory/Api/Twitter/Status.php index 810b421cab..b4b4039f6a 100644 --- a/src/Factory/Api/Twitter/Status.php +++ b/src/Factory/Api/Twitter/Status.php @@ -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); diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index 82fdcc3cbe..b289414cc6 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -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' => '

Header

This is a paragraph
with a line feed.

Second Chapter

', + 'expectedHTML' => "

Header

This is a paragraph
with a line feed.

Second Chapter

", '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' => [ diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index 8838945899..86b91deb36 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -64,7 +64,7 @@ class StatusTest extends FixtureTest ->toArray(); self::assertStringStartsWith('item_title', $status['text']); - self::assertStringStartsWith('

item_title


perspiciatis impedit voluptatem', $status['friendica_html']); + self::assertStringStartsWith('

item_title

perspiciatis impedit voluptatem', $status['friendica_html']); } /**