From 354fb98cc96595870c1962d5939f0bab24951ffa Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 15 Aug 2019 12:56:32 +0200 Subject: Markdown plugin: fix RSS feed direct link reverse The plugin was only reversing permalinks and failed with setting rss_permalinks set to false --- tests/plugins/PluginMarkdownTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/plugins') 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 $this->assertEquals($expected, $processedText); } + public function testReverseFeedDirectLink() + { + $text = 'Description... '; + $text .= '— Direct link'; + $expected = 'Description... — [Direct link](http://domain.tld/?0oc_VQ)'; + $processedText = reverse_feed_permalink($text); + + $this->assertEquals($expected, $processedText); + } + public function testReverseLastFeedPermalink() { $text = 'Description... '; -- cgit v1.2.3