X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fplugins%2FPluginMarkdownTest.php;h=96891f1f39788b96faaf27f2a9a9a07609c3ab68;hb=601faf97516a836e4ae57dc4cecb9225c0a04338;hp=d4cd1b97376657aeeb4952de7be0236d8848b555;hpb=e03761011521929a375ebb56f21adacb226a3a8d;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index d4cd1b97..96891f1f 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php @@ -1,4 +1,5 @@ conf = new ConfigManager('tests/utils/config/configJson'); + $this->conf->set('security.allowed_protocols', ['ftp', 'magnet']); } /** @@ -182,15 +184,19 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase } /** - * Test hashtag links processed with markdown. + * Make sure that the generated HTML match the reference HTML file. */ - public function testMarkdownHashtagLinks() + public function testMarkdownGlobalProcessDescription() { $md = file_get_contents('tests/plugins/resources/markdown.md'); $md = format_description($md); $html = file_get_contents('tests/plugins/resources/markdown.html'); - $data = process_markdown($md); + $data = process_markdown( + $md, + $this->conf->get('security.markdown_escape', true), + $this->conf->get('security.allowed_protocols') + ); $this->assertEquals($html, $data); }