mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Add tests
This commit is contained in:
parent
423ab06010
commit
69ee39b725
2 changed files with 109 additions and 19 deletions
|
@ -53,6 +53,44 @@ class MarkdownTest extends FixtureTestCase
|
|||
'expectedBBCode' => 'with the <sup> and </sup> tag',
|
||||
'markdown' => 'with the <sup> and </sup> tag',
|
||||
],
|
||||
/** @see https://github.com/friendica/friendica/pull/14940 */
|
||||
'task-14940-youtube-watch-with-www' => [
|
||||
'expectedBBCode' => '[youtube]hfwbmTzBFT0[/youtube]',
|
||||
'markdown' => '[url=https://www.youtube.com/watch?v=hfwbmTzBFT0]https://www.youtube.com/watch?v=hfwbmTzBFT0[/url]',
|
||||
],
|
||||
'task-14940-youtube-watch-without-www' => [
|
||||
'expectedBBCode' => '[youtube]hfwbmTzBFT0[/youtube]',
|
||||
'markdown' => '[url=https://youtube.com/watch?v=hfwbmTzBFT0]https://youtube.com/watch?v=hfwbmTzBFT0[/url]',
|
||||
],
|
||||
'task-14940-youtube-shorts-with-www' => [
|
||||
'expectedBBCode' => '[youtube]hfwbmTzBFT0[/youtube]',
|
||||
'markdown' => '[url=https://www.youtube.com/shorts/hfwbmTzBFT0]https://www.youtube.com/shorts/hfwbmTzBFT0[/url]',
|
||||
],
|
||||
'task-14940-youtube-shorts-without-www' => [
|
||||
'expectedBBCode' => '[youtube]hfwbmTzBFT0[/youtube]',
|
||||
'markdown' => '[url=https://youtube.com/shorts/hfwbmTzBFT0]https://youtube.com/shorts/hfwbmTzBFT0[/url]',
|
||||
],
|
||||
'task-14940-youtube-embed-with-www' => [
|
||||
'expectedBBCode' => '[youtube]hfwbmTzBFT0[/youtube]',
|
||||
'markdown' => '[url=https://www.youtube.com/embed/hfwbmTzBFT0]https://www.youtube.com/embed/hfwbmTzBFT0[/url]',
|
||||
],
|
||||
'task-14940-youtube-embed-without-www' => [
|
||||
'expectedBBCode' => '[youtube]hfwbmTzBFT0[/youtube]',
|
||||
'markdown' => '[url=https://youtube.com/embed/hfwbmTzBFT0]https://youtube.com/embed/hfwbmTzBFT0[/url]',
|
||||
],
|
||||
// @todo - should we really ignore the URL content in favor of parsing the link of the body?
|
||||
'task-14940-vimeo-custom-url' => [
|
||||
'expectedBBCode' => '[vimeo]2345345[/vimeo]',
|
||||
'markdown' => '[url=https://no.thing]https://vimeo.com/2345345[/url]',
|
||||
],
|
||||
'task-14940-vimeo-custom-text' => [
|
||||
'expectedBBCode' => '[vimeo]2345345[/vimeo]',
|
||||
'markdown' => '[url=https://vimeo.com/2345345]CustomText[/url]',
|
||||
],
|
||||
'task-14940-player-vimeo' => [
|
||||
'expectedBBCode' => '[vimeo]2345345[/vimeo]',
|
||||
'markdown' => '[url=https://player.vimeo.com/video/2345345]https://player.vimeo.com/video/2345345[/url]',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue