getUrlForScheme() 공개 메소드

Builds a URL with a different scheme
public getUrlForScheme ( $scheme ) : Url
리턴 Url
예제 #1
0
파일: UrlTest.php 프로젝트: 99designs/ergo
 public function testGetUrlForScheme()
 {
     // implicit default port
     $url = new Http\Url('http://example.org');
     $this->assertEquals('https://example.org/', (string) $url->getUrlForScheme('https'));
     // explicit default port
     $url = new Http\Url('http://example.org:80');
     $this->assertEquals('https://example.org/', (string) $url->getUrlForScheme('https'));
     // explicit non standard port
     $url = new Http\Url('http://example.org:123');
     $this->assertEquals('https://example.org:123/', (string) $url->getUrlForScheme('https'));
 }