public function testGetUrl() { $this->url->setScheme($this->getUrlPartMock(Scheme::class, 'https://')); $this->url->setUserInfo($this->getUrlPartMock(UserInfo::class, 'root:pass@')); $this->url->setHost($this->getUrlPartMock(Host::class, 'example.com')); $this->url->setPort($this->getUrlPartMock(Port::class, ':8080')); $this->url->setPath($this->getUrlPartMock(Path::class, '/test/path/')); $this->url->setQuery($this->getUrlPartMock(Query::class, '?key1=val1&key2=val2')); $this->url->setFragment($this->getUrlPartMock(Fragment::class, '#fragment')); $this->assertEquals('https://*****:*****@example.com:8080/test/path/?key1=val1&key2=val2#fragment', $this->url->getUrl()); }
/** * @return string */ public function createUrl() { return $this->_url->getUrl(); }