public function test_it_adds_paths() { $uri = Utils::addPaths(uri_for('http://openstack.org/foo'), 'bar', 'baz', '1', '2'); $this->assertInstanceOf(Uri::class, $uri); $this->assertEquals(uri_for('http://openstack.org/foo/bar/baz/1/2'), $uri); }
/** * Retrieves the public URI for this resource. * * @return \GuzzleHttp\Psr7\Uri */ public function getPublicUri() { //return $this->getHttpBaseUrl() . '/' . $this->containerName . '/' . $this->name; return Utils::addPaths($this->getHttpBaseUrl(), $this->containerName, $this->name); }
/** * Retrieves the public URI for this resource. * * @return \GuzzleHttp\Psr7\Uri */ public function getPublicUri() : Uri { return Utils::addPaths($this->getHttpBaseUrl(), $this->containerName, $this->name); }