aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2019-08-15 12:56:32 +0200
committerArthurHoaro <arthur@hoa.ro>2019-08-15 12:56:32 +0200
commit354fb98cc96595870c1962d5939f0bab24951ffa (patch)
treeda4e5cd83244f3aba45eb9679ff34667c805f389 /tests
parent0a4bc5a17dd8bc198d45aca13f9e40de4664159d (diff)
downloadShaarli-354fb98cc96595870c1962d5939f0bab24951ffa.tar.gz
Shaarli-354fb98cc96595870c1962d5939f0bab24951ffa.tar.zst
Shaarli-354fb98cc96595870c1962d5939f0bab24951ffa.zip
Markdown plugin: fix RSS feed direct link reverse
The plugin was only reversing permalinks and failed with setting rss_permalinks set to false
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/PluginMarkdownTest.php10
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 .= '&#8212; <a href="http://domain.tld/?0oc_VQ" title="Direct link">Direct link</a>';
163 $expected = 'Description... &#8212; [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... ';