diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-10-21 12:38:38 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-11-05 14:30:56 +0100 |
commit | 95a12c7c0f3d074c3e61507b3fc33879b042f683 (patch) | |
tree | 59cacc4ebf6453efe8eb9d3392a7680a612eff96 /tests/plugins/PluginMarkdownTest.php | |
parent | df90715655347c53aa9743de156b163de8fbd784 (diff) | |
download | Shaarli-95a12c7c0f3d074c3e61507b3fc33879b042f683.tar.gz Shaarli-95a12c7c0f3d074c3e61507b3fc33879b042f683.tar.zst Shaarli-95a12c7c0f3d074c3e61507b3fc33879b042f683.zip |
Fix an issue with links not being reversed in code blocks
Fixes #672
+ Markdown to HTML unit test
Diffstat (limited to 'tests/plugins/PluginMarkdownTest.php')
-rw-r--r-- | tests/plugins/PluginMarkdownTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index 3593a556..12bdda24 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php | |||
@@ -151,4 +151,17 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase | |||
151 | $data = hook_markdown_render_daily($data); | 151 | $data = hook_markdown_render_daily($data); |
152 | $this->assertEquals($str, $data['cols'][0][0]['formatedDescription']); | 152 | $this->assertEquals($str, $data['cols'][0][0]['formatedDescription']); |
153 | } | 153 | } |
154 | |||
155 | /** | ||
156 | * Test hashtag links processed with markdown. | ||
157 | */ | ||
158 | function testMarkdownHashtagLinks() | ||
159 | { | ||
160 | $md = file_get_contents('tests/plugins/resources/markdown.md'); | ||
161 | $md = format_description($md); | ||
162 | $html = file_get_contents('tests/plugins/resources/markdown.html'); | ||
163 | |||
164 | $data = process_markdown($md); | ||
165 | $this->assertEquals($html, $data); | ||
166 | } | ||
154 | } | 167 | } |