withScheme() 공개 메소드

public withScheme ( $scheme )
예제 #1
0
파일: UriTest.php 프로젝트: phly/http
 /**
  * @dataProvider invalidSchemes
  */
 public function testMutatingWithUnsupportedSchemeRaisesAnException($scheme)
 {
     $uri = new Uri('http://example.com');
     $this->setExpectedException('InvalidArgumentException', 'Unsupported scheme');
     $uri->withScheme($scheme);
 }
예제 #2
0
파일: UriTest.php 프로젝트: easySuite/ding2
 /**
  * @group 48
  */
 public function testWithSchemeReturnsSameInstanceWhenSchemeDoesNotChange()
 {
     $uri = new Uri('http://example.com');
     $test = $uri->withScheme('http');
     $this->assertSame($uri, $test);
 }