Tests added

This commit is contained in:
Michael 2023-03-21 04:20:03 +00:00
parent 0f9099dec6
commit 7e6ba0b4d2
2 changed files with 10 additions and 2 deletions

View file

@ -317,6 +317,14 @@ Karl Marx - Die ursprüngliche Akkumulation
'expected' => '&`&`',
'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]'
],
];
}
@ -331,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);