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()); }
public function setUp() { $this->client = new CcbillClient(); $this->client->setClient(['accnum' => '123', 'subacc' => '456', 'salt' => '789']); $this->form = new DynamicPricingForm($this->client, ['formName' => '75cc', 'formPrice' => '18.00', 'formPeriod' => 10, 'currencyCode' => 840]); }
public function setUp() { $this->client = new CcbillClient(); $this->client->setClient(['accnum' => '123', 'subacc' => '456', 'salt' => '789']); }