public function setUp() { $this->client = new Client('username', 'password'); $this->httpRequest = new CurlGet(); $this->client->setHttpRequest($this->httpRequest); }
/** * @return bool * @throws \Exception */ public function send() { $this->doValidation(); $values = $this->prepareValues(); return $this->client->doRequest($values); }
/** * @expectedException \Exception * @expectedExceptionMessage Error message. * @expectedExceptionCode 1234 */ public function testResponseErrorCode() { $failure = "<?xml version=\"1.0\"?>\n<ack refno=\"1234\" errorcode=\"1234\">Error message.</ack>"; $this->client->parseResponse($failure, 200); }