ParsedownTest::testSlugRelativeLinksSubDirAbsoluteUrls PHP Method

testSlugRelativeLinksSubDirAbsoluteUrls() public method

    public function testSlugRelativeLinksSubDirAbsoluteUrls()
    {
        $this->config->set('system.absolute_urls', true);
        $this->uri->initializeWithUrlAndRootPath('http://testing.dev/subdir/item2/item2-2', '/subdir')->init();
        $this->assertSame('<p><a href="http://testing.dev/subdir/item2/item2-1">Peer Page</a></p>', $this->parsedown->text('[Peer Page](../item2-1)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item2/item2-2/item2-2-1">Down a Level</a></p>', $this->parsedown->text('[Down a Level](item2-2-1)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item2">Up a Level</a></p>', $this->parsedown->text('[Up a Level](..)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir">Up to Root Level</a></p>', $this->parsedown->text('[Up to Root Level](../..)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item3/item3-3">Up and Down</a></p>', $this->parsedown->text('[Up and Down](../../item3/item3-3)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item2/item2-2/item2-2-1?foo=bar">Down a Level with Query</a></p>', $this->parsedown->text('[Down a Level with Query](item2-2-1?foo=bar)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item2?foo=bar">Up a Level with Query</a></p>', $this->parsedown->text('[Up a Level with Query](../?foo=bar)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item3/item3-3?foo=bar">Up and Down with Query</a></p>', $this->parsedown->text('[Up and Down with Query](../../item3/item3-3?foo=bar)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item3/item3-3/foo:bar">Up and Down with Param</a></p>', $this->parsedown->text('[Up and Down with Param](../../item3/item3-3/foo:bar)'));
        $this->assertSame('<p><a href="http://testing.dev/subdir/item3/item3-3#foo">Up and Down with Anchor</a></p>', $this->parsedown->text('[Up and Down with Anchor](../../item3/item3-3#foo)'));
    }