ParsedownTest::testAnchorLinksSubDirRelativeUrls PHP Method

testAnchorLinksSubDirRelativeUrls() public method

    public function testAnchorLinksSubDirRelativeUrls()
    {
        $this->uri->initializeWithUrlAndRootPath('http://testing.dev/subdir/item2/item2-2', '/subdir')->init();
        $this->assertSame('<p><a href="/subdir/item2/item2-1#foo">Peer Anchor</a></p>', $this->parsedown->text('[Peer Anchor](../item2-1#foo)'));
        $this->assertSame('<p><a href="/subdir/item2/item2-1#foo">Peer Anchor 2</a></p>', $this->parsedown->text('[Peer Anchor 2](../item2-1/#foo)'));
        $this->assertSame('<p><a href="#foo">Current Anchor</a></p>', $this->parsedown->text('[Current Anchor](#foo)'));
        $this->assertSame('<p><a href="/subdir/#foo">Root Anchor</a></p>', $this->parsedown->text('[Root Anchor](/#foo)'));
    }