diff options
author | VirtualTam <virtualtam@flibidi.net> | 2017-08-23 01:08:41 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2017-08-23 01:08:41 +0200 |
commit | 9d7a02afcee3c740712a7c95182d332db0504b7e (patch) | |
tree | 3266e3d3bfec6a3ac075084cbec07ba4090c4cd2 /tests/plugins/PluginMarkdownTest.php | |
parent | c318096c7a6fb3f6b00bd8c694ab7acb8fbb7cd0 (diff) | |
parent | 7c2460c856c1d561b8347316f3045208f9f3d24e (diff) | |
download | Shaarli-9d7a02afcee3c740712a7c95182d332db0504b7e.tar.gz Shaarli-9d7a02afcee3c740712a7c95182d332db0504b7e.tar.zst Shaarli-9d7a02afcee3c740712a7c95182d332db0504b7e.zip |
Merge branch 'master' into v0.9
Diffstat (limited to 'tests/plugins/PluginMarkdownTest.php')
-rw-r--r-- | tests/plugins/PluginMarkdownTest.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index d8180ad6..96891f1f 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php | |||
@@ -26,6 +26,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase | |||
26 | { | 26 | { |
27 | PluginManager::$PLUGINS_PATH = 'plugins'; | 27 | PluginManager::$PLUGINS_PATH = 'plugins'; |
28 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 28 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
29 | $this->conf->set('security.allowed_protocols', ['ftp', 'magnet']); | ||
29 | } | 30 | } |
30 | 31 | ||
31 | /** | 32 | /** |
@@ -183,15 +184,19 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase | |||
183 | } | 184 | } |
184 | 185 | ||
185 | /** | 186 | /** |
186 | * Test hashtag links processed with markdown. | 187 | * Make sure that the generated HTML match the reference HTML file. |
187 | */ | 188 | */ |
188 | public function testMarkdownHashtagLinks() | 189 | public function testMarkdownGlobalProcessDescription() |
189 | { | 190 | { |
190 | $md = file_get_contents('tests/plugins/resources/markdown.md'); | 191 | $md = file_get_contents('tests/plugins/resources/markdown.md'); |
191 | $md = format_description($md); | 192 | $md = format_description($md); |
192 | $html = file_get_contents('tests/plugins/resources/markdown.html'); | 193 | $html = file_get_contents('tests/plugins/resources/markdown.html'); |
193 | 194 | ||
194 | $data = process_markdown($md); | 195 | $data = process_markdown( |
196 | $md, | ||
197 | $this->conf->get('security.markdown_escape', true), | ||
198 | $this->conf->get('security.allowed_protocols') | ||
199 | ); | ||
195 | $this->assertEquals($html, $data); | 200 | $this->assertEquals($html, $data); |
196 | } | 201 | } |
197 | 202 | ||