/** * @test */ public function testSetServiceName() { $this->object->setServiceName('Invoice'); $this->assertEquals('Invoice', $this->object->serviceName); $object = new PPAPIService('ServiceName'); $this->assertEquals('ServiceName', $object->serviceName); }
/** * @test */ public function testMakeRequestWithoutHandlers() { $this->object->setServiceName('Invoice'); $this->setExpectedException('PPConnectionException'); $req = new PPRequest(new MockNVPClass(), "NV"); $this->object->makeRequest('GetInvoiceDetails', $req); }
public function call($method, $requestObject, $apiUsername = null) { $params = $this->marshall($requestObject); $service = new PPAPIService(); $service->setServiceName($this->serviceName); $this->lastRequest = $params; $this->lastResponse = $service->makeRequest($method, $params, $apiUsername, $this->accessToken, $this->tokenSecret); return $this->lastResponse; }
/** * @test */ public function testSetServiceName() { $this->assertEquals('AdaptiveAccounts', $this->object->serviceName); $this->object->setServiceName('Invoice'); $this->assertEquals('Invoice', $this->object->serviceName); }