withPort() 공개 메소드

public withPort ( $port )
예제 #1
0
파일: UriTest.php 프로젝트: phly/http
 /**
  * @dataProvider invalidPorts
  */
 public function testWithPortRaisesExceptionForInvalidPorts($port)
 {
     $uri = new Uri('https://*****:*****@local.example.com:3001/foo?bar=baz#quz');
     $this->setExpectedException('InvalidArgumentException', 'Invalid port');
     $new = $uri->withPort($port);
 }
예제 #2
0
파일: UriTest.php 프로젝트: easySuite/ding2
 /**
  * @group 48
  */
 public function testWithPortReturnsSameInstanceWhenPortDoesNotChange()
 {
     $uri = new Uri('http://example.com:8080');
     $test = $uri->withPort(8080);
     $this->assertSame($uri, $test);
 }