withQuery() 공개 메소드

public withQuery ( $query )
예제 #1
0
파일: UriTest.php 프로젝트: phly/http
 public function testStripsQueryPrefixIfPresent()
 {
     $uri = new Uri('http://example.com');
     $new = $uri->withQuery('?foo=bar');
     $this->assertEquals('foo=bar', $new->getQuery());
 }
예제 #2
0
파일: UriTest.php 프로젝트: easySuite/ding2
 /**
  * @group 48
  */
 public function testWithQueryReturnsSameInstanceWhenQueryDoesNotChange()
 {
     $uri = new Uri('http://example.com/test/path?foo=bar');
     $test = $uri->withQuery('foo=bar');
     $this->assertSame($uri, $test);
 }