]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Content/Text/BBCodeTest.php
Tests added
[friendica.git] / tests / src / Content / Text / BBCodeTest.php
index b7328d67d76c1e8e3938ce6cf1186ab7f629e689..74d34f5a5e836064cc001ac6a892a6eace2b48d7 100644 (file)
@@ -267,13 +267,17 @@ Karl Marx - Die ursprüngliche Akkumulation
                                'text' => '[h1]Header[/h1]Some Chapter',
                        ],
                        'bug-12842-ul-newlines' => [
-                               'expectedHTML' => '<p>This is:</p><ul><li>some<br></li><li>amazing<br></li><li>list</li></ul>',
+                               'expectedHTML' => '<p>This is:</p><ul><li>some</li><li>amazing</li><li>list</li></ul>',
                                'text' => "This is:\r\n[ul]\r\n[*]some\r\n[*]amazing\r\n[*]list\r\n[/ul]",
                        ],
                        'bug-12842-ol-newlines' => [
-                               'expectedHTML' => '<p>This is:</p><ol><li>some<br></li><li>amazing<br></li><li>list</li></ol>',
+                               'expectedHTML' => '<p>This is:</p><ol><li>some</li><li>amazing</li><li>list</li></ol>',
                                'text' => "This is:\r\n[ol]\r\n[*]some\r\n[*]amazing\r\n[*]list\r\n[/ol]",
                        ],
+                       'task-12917-tabs-between-linebreaks' => [
+                               'expectedHTML' => '<p>Paragraph</p><p>New Paragraph</p>',
+                               'text' => "Paragraph\n\t\nNew Paragraph",
+                       ],
                ];
        }
 
@@ -313,6 +317,14 @@ Karl Marx - Die ursprüngliche Akkumulation
                                'expected' => '&amp;`&`',
                                'text' => '&[code]&[/code]',
                        ],
+                       'bug-12701-quotes' => [
+                               'expected' => '[![abc"fgh](https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png)](https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581)',
+                               'text' => '[url=https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581][img=https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png]abc"fgh[/img][/url]'
+                       ],
+                       'bug-12701-no-quotes' => [
+                               'expected' => '[![abcfgh](https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png "abcfgh")](https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581)',
+                               'text' => '[url=https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581][img=https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png]abcfgh[/img][/url]'
+                       ],
                ];
        }
 
@@ -327,7 +339,7 @@ Karl Marx - Die ursprüngliche Akkumulation
         *
         * @throws InternalServerErrorException
         */
-       public function testToMarkdown(string $expected, string $text, $for_diaspora = false)
+       public function testToMarkdown(string $expected, string $text, $for_diaspora = true)
        {
                $actual = BBCode::toMarkdown($text, $for_diaspora);