ParsedownTest::testAnchorLinksSubDirAbsoluteUrls PHP Method

testAnchorLinksSubDirAbsoluteUrls() public method

    public function testAnchorLinksSubDirAbsoluteUrls()
    {
        $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#foo">Peer Anchor</a></p>', $this->parsedown->text('[Peer Anchor](../item2-1#foo)'));
        $this->assertSame('<p><a href="http://testing.dev/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="http://testing.dev/subdir/#foo">Root Anchor</a></p>', $this->parsedown->text('[Root Anchor](/#foo)'));
    }