示例#1
0
 /**
  * Test replacing the whole path.
  *
  * @return void
  */
 public function testReplacePath()
 {
     $request = $this->buildMockRequest('/test/example', array('host' => 'example.com'));
     $config = $this->buildMockConfiguration();
     $builder = new UriBuilder($config, $request);
     $uri = $builder->replacePath('/donkey/kong/')->build();
     $this->assertEquals('http://example.com/donkey/kong', $uri);
 }
示例#2
0
文件: UriInfo.php 项目: 360i/sonno
 /**
  * Get the base URI of the application in the form of a UriBuilder.
  *
  * @return \Sonno\Uri\UriBuilder
  */
 public function getBaseUriBuilder()
 {
     $builder = new UriBuilder($this->_config, $this->_request);
     return $builder->replacePath($this->getBaseUri());
 }