Example #1
0
 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'));
 }
Example #2
0
 public function build(Client $client, Form $form)
 {
     return $client->buildUrl($form->getPath()) . '?' . http_build_query($form->serialize());
 }