/** * Constructor * * @param string $url to paybox endpoint * * @throws \RuntimeException If cURL is not available */ public function __construct($url = '') { if (!function_exists('curl_init')) { throw new \RuntimeException('cURL is not available. Activate it first.'); } parent::__construct($url); }
/** * {@inheritDoc} */ public function __construct($url = '') { $this->browser = new Browser(new Curl()); parent::__construct($url); }
public function testGetEndpoint() { $this->object->setEndpoint('http://www.hello.fr/hey.cgi'); $this->assertTrue(is_string($this->object->getEndpoint())); $this->assertEquals('http://www.hello.fr/hey.cgi', $this->object->getEndpoint()); }