Pagekit\Filesystem\Tests\FileTest::testGetUrlExternal PHP Method

testGetUrlExternal() public method

public testGetUrlExternal ( )
    public function testGetUrlExternal()
    {
        $ftp = 'ftp://example.com';
        $http = 'http://username:[email protected]/path?arg=value#anchor';
        $this->assertSame('/', $this->file->getUrl($ftp));
        $this->assertSame('//example.com', $this->file->getUrl($ftp, 3));
        $this->assertSame($ftp, $this->file->getUrl($ftp, true));
        $this->assertSame('/path?arg=value#anchor', $this->file->getUrl($http));
        $this->assertSame('//username:[email protected]/path?arg=value#anchor', $this->file->getUrl($http, 3));
        $this->assertSame($http, $this->file->getUrl($http, true));
    }