diff --git a/tests/unit/Grav/Common/MarkdownTest.php b/tests/unit/Grav/Common/MarkdownTest.php index d295a9899..62d532e8e 100644 --- a/tests/unit/Grav/Common/MarkdownTest.php +++ b/tests/unit/Grav/Common/MarkdownTest.php @@ -62,7 +62,7 @@ class MarkdownTest extends \Codeception\TestCase\Test return preg_replace('/^\s*(.*)/', '', $string); } - public function testDirectoryRelativeLinks() + public function testSlugRelativeLinks() { $this->assertSame($this->parsedown->text('[Down a Level](item2-2-1)'), '
'); @@ -82,6 +82,22 @@ class MarkdownTest extends \Codeception\TestCase\Test ''); } + public function testDirectoryRelativeLinks() + { + $this->assertSame($this->parsedown->text('[Down a Level](01.item2-2-1)'), + ''); + $this->assertSame($this->parsedown->text('[Up and Down](../../03.item3/03.item3-3)'), + ''); + $this->assertSame($this->parsedown->text('[Down a Level with Query](01.item2-2-1?foo=bar)'), + ''); + $this->assertSame($this->parsedown->text('[Up and Down with Query](../../03.item3/03.item3-3?foo=bar)'), + ''); +// $this->assertSame($this->parsedown->text('[Up and Down with Param](../../03.item3/03.item3-3/foo:bar)'), +// ''); + $this->assertSame($this->parsedown->text('[Up and Down with Anchor](../../03.item3/03.item3-3#foo)'), + ''); + } + public function testMarkdownSpecialProtocols() { $this->assertSame($this->parsedown->text('[mailto](mailto:user@domain.com)'),