ParsedownTest::testAnchorLinksRelativeUrls PHP Method

testAnchorLinksRelativeUrls() public method

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