コード例 #1
0
ファイル: PsrUriTest.php プロジェクト: im286er/windwalker
 /**
  * testWithFragment
  *
  * @return  void
  */
 public function testWithFragment()
 {
     $uri = new PsrUri('https://*****:*****@local.example.com:3001/foo?bar=baz#quz');
     $new = $uri->withFragment('qat');
     $this->assertNotSame($uri, $new);
     $this->assertEquals('qat', $new->getFragment());
     $this->assertEquals('https://*****:*****@local.example.com:3001/foo?bar=baz#qat', (string) $new);
     $uri = new PsrUri('http://example.com');
     $new = $uri->withFragment('#/foo/bar');
     $this->assertEquals('/foo/bar', $new->getFragment());
 }