From d4aec5cbd3701cee0650b00d9ab1f761114944f2 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 17 Mar 2023 12:41:26 +0000 Subject: [PATCH] Revert tests --- tests/src/Content/Text/BBCodeTest.php | 36 +++++++++---------- .../Factory/Api/Twitter/DirectMessageTest.php | 2 +- .../Module/Api/Friendica/NotificationTest.php | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index 10be79c722..16cbec330a 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -146,7 +146,7 @@ class BBCodeTest extends FixtureTest public function testAutoLinking(string $data, bool $assertHTML) { $output = BBCode::convert($data); - $assert = $this->HTMLPurifier->purify('

' . $data . '

'); + $assert = $this->HTMLPurifier->purify('' . $data . ''); if ($assertHTML) { self::assertEquals($assert, $output); } else { @@ -178,74 +178,74 @@ class BBCodeTest extends FixtureTest [/ul]', ], 'bug-2199-named-size' => [ - 'expectedHtml' => '

Test text

', + 'expectedHtml' => 'Test text', 'text' => '[size=xx-large]Test text[/size]', ], 'bug-2199-numeric-size' => [ - 'expectedHtml' => '

Test text

', + 'expectedHtml' => 'Test text', 'text' => '[size=24]Test text[/size]', ], 'bug-2199-diaspora-no-named-size' => [ - 'expectedHtml' => '

Test text

', + 'expectedHtml' => 'Test text', 'text' => '[size=xx-large]Test text[/size]', 'try_oembed' => false, // Triggers the diaspora compatible output 'simpleHtml' => BBCode::DIASPORA, ], 'bug-2199-diaspora-no-numeric-size' => [ - 'expectedHtml' => '

Test text

', + 'expectedHtml' => 'Test text', 'text' => '[size=24]Test text[/size]', 'try_oembed' => false, // Triggers the diaspora compatible output 'simpleHtml' => BBCode::DIASPORA, ], 'bug-7665-audio-tag' => [ - 'expectedHtml' => '

', + 'expectedHtml' => '', 'text' => '[audio]http://www.cendrones.fr/colloque2017/jonathanbocquet.mp3[/audio]', 'try_oembed' => true, ], 'bug-7808-code-lt' => [ - 'expectedHtml' => '

<

', + 'expectedHtml' => '<', 'text' => '[code]<[/code]', ], 'bug-7808-code-gt' => [ - 'expectedHtml' => '

>

', + 'expectedHtml' => '>', 'text' => '[code]>[/code]', ], 'bug-7808-code-amp' => [ - 'expectedHtml' => '

&

', + 'expectedHtml' => '&', 'text' => '[code]&[/code]', ], 'task-8800-pre-spaces-notag' => [ - 'expectedHtml' => '

[test] Space

', + 'expectedHtml' => '[test] Space', 'text' => '[test] Space', ], 'task-8800-pre-spaces' => [ - 'expectedHtml' => '

    Spaces

', + 'expectedHtml' => ' Spaces', 'text' => '[pre] Spaces[/pre]', ], 'bug-9611-purify-xss-nobb' => [ - 'expectedHTML' => '

dare to move your mouse here

', + 'expectedHTML' => 'dare to move your mouse here', 'text' => '[nobb]dare to move your mouse here[/nobb]' ], 'bug-9611-purify-xss-noparse' => [ - 'expectedHTML' => '

dare to move your mouse here

', + 'expectedHTML' => 'dare to move your mouse here', 'text' => '[noparse]dare to move your mouse here[/noparse]' ], 'bug-9611-purify-xss-attributes' => [ - 'expectedHTML' => '

dare to move your mouse here

', + 'expectedHTML' => 'dare to move your mouse here', 'text' => '[color="onmouseover=alert(0) style="]dare to move your mouse here[/color]' ], 'bug-9611-purify-attributes-correct' => [ - 'expectedHTML' => '

dare to move your mouse here

', + 'expectedHTML' => 'dare to move your mouse here', 'text' => '[color=FFFFFF]dare to move your mouse here[/color]' ], 'bug-9639-span-classes' => [ - 'expectedHTML' => '

Test

', + 'expectedHTML' => 'Test', 'text' => '[class=arbitrary classes]Test[/class]', ], 'bug-10772-duplicated-links' => [ - 'expectedHTML' => '

Jetzt wird mir klar, warum Kapitalisten jedes Mal durchdrehen wenn Marx und das Kapital ins Gespräch kommt. Soziopathen.
Karl Marx - Die ursprüngliche Akkumulation
https://wohlstandfueralle.podigee.io/107-urspruengliche-akkumulation
#Podcast #Kapitalismus

', + 'expectedHTML' => 'Jetzt wird mir klar, warum Kapitalisten jedes Mal durchdrehen wenn Marx und das Kapital ins Gespräch kommt. Soziopathen.
Karl Marx - Die ursprüngliche Akkumulation
https://wohlstandfueralle.podigee.io/107-urspruengliche-akkumulation
#Podcast #Kapitalismus', 'text' => "Jetzt wird mir klar, warum Kapitalisten jedes Mal durchdrehen wenn Marx und das Kapital ins Gespräch kommt. Soziopathen. Karl Marx - Die ursprüngliche Akkumulation [url=https://wohlstandfueralle.podigee.io/107-urspruengliche-akkumulation]https://wohlstandfueralle.podigee.io/107-urspruengliche-akkumulation[/url] @@ -255,7 +255,7 @@ Karl Marx - Die ursprüngliche Akkumulation 'simpleHtml' => BBCode::TWITTER, ], 'task-10886-deprecate-class' => [ - 'expectedHTML' => '

:heart_nb:

', + 'expectedHTML' => ':heart_nb:', 'text' => '[emoji=https://fedi.underscore.world/emoji/custom/custom/heart_nb.png]:heart_nb:[/emoji]', ] ]; diff --git a/tests/src/Factory/Api/Twitter/DirectMessageTest.php b/tests/src/Factory/Api/Twitter/DirectMessageTest.php index 62a9c43e59..216c4051fa 100644 --- a/tests/src/Factory/Api/Twitter/DirectMessageTest.php +++ b/tests/src/Factory/Api/Twitter/DirectMessageTest.php @@ -67,7 +67,7 @@ class DirectMessageTest extends FixtureTest ->toArray(); self::assertEquals('item_title', $directMessage['title']); - self::assertEquals('

item_body

', $directMessage['text']); + self::assertEquals('item_body', $directMessage['text']); } /** diff --git a/tests/src/Module/Api/Friendica/NotificationTest.php b/tests/src/Module/Api/Friendica/NotificationTest.php index e9eafc9330..aaf7022024 100644 --- a/tests/src/Module/Api/Friendica/NotificationTest.php +++ b/tests/src/Module/Api/Friendica/NotificationTest.php @@ -62,7 +62,7 @@ class NotificationTest extends ApiTest $assertXml = << - + XML;