diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-08-15 12:59:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-15 12:59:57 +0200 |
commit | 188a99db99288d60001e8d83ecf1103b9919ed1e (patch) | |
tree | fe897d8c07b8e9bc6319734051eb8eab99d0f1cf /tests | |
parent | 5669f474f329c13f87823acc3862fd24ff00a65e (diff) | |
parent | 354fb98cc96595870c1962d5939f0bab24951ffa (diff) | |
download | Shaarli-188a99db99288d60001e8d83ecf1103b9919ed1e.tar.gz Shaarli-188a99db99288d60001e8d83ecf1103b9919ed1e.tar.zst Shaarli-188a99db99288d60001e8d83ecf1103b9919ed1e.zip |
Merge pull request #1355 from ArthurHoaro/hotfix/feed-md-directlink
Markdown plugin: fix RSS feed direct link reverse
Diffstat (limited to 'tests')
-rw-r--r-- | tests/plugins/PluginMarkdownTest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index 9ddbc558..15fa9ba5 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php | |||
@@ -156,6 +156,16 @@ class PluginMarkdownTest extends \PHPUnit\Framework\TestCase | |||
156 | $this->assertEquals($expected, $processedText); | 156 | $this->assertEquals($expected, $processedText); |
157 | } | 157 | } |
158 | 158 | ||
159 | public function testReverseFeedDirectLink() | ||
160 | { | ||
161 | $text = 'Description... '; | ||
162 | $text .= '— <a href="http://domain.tld/?0oc_VQ" title="Direct link">Direct link</a>'; | ||
163 | $expected = 'Description... — [Direct link](http://domain.tld/?0oc_VQ)'; | ||
164 | $processedText = reverse_feed_permalink($text); | ||
165 | |||
166 | $this->assertEquals($expected, $processedText); | ||
167 | } | ||
168 | |||
159 | public function testReverseLastFeedPermalink() | 169 | public function testReverseLastFeedPermalink() |
160 | { | 170 | { |
161 | $text = 'Description... '; | 171 | $text = 'Description... '; |