public function test_base_url() { $this->client->setBaseUrl('https://mcprohosting.com'); $this->assertEquals('https://mcprohosting.com/foo/bar', $this->client->buildUrl('/foo/bar')); $this->assertEquals('https://mcprohosting.com/foo/bar', $this->client->buildUrl('foo/bar')); $this->client->setBaseUrl('https://mcprohosting.com/'); $this->assertEquals('https://mcprohosting.com/foo/bar', $this->client->buildUrl('/foo/bar')); $this->assertEquals('https://mcprohosting.com/foo/bar', $this->client->buildUrl('foo/bar')); }
public function build(Client $client, Form $form) { return $client->buildUrl($form->getPath()) . '?' . http_build_query($form->serialize()); }