/** * 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); }
/** * 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()); }