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());
 }
Example #3
0
 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']);
 }