예제 #1
0
 /**
  * @test
  */
 public function testSetServiceName()
 {
     $this->object->setServiceName('Invoice');
     $this->assertEquals('Invoice', $this->object->serviceName);
     $object = new PPAPIService('ServiceName');
     $this->assertEquals('ServiceName', $object->serviceName);
 }
예제 #2
0
 /**
  * @test
  */
 public function testMakeRequestWithoutHandlers()
 {
     $this->object->setServiceName('Invoice');
     $this->setExpectedException('PPConnectionException');
     $req = new PPRequest(new MockNVPClass(), "NV");
     $this->object->makeRequest('GetInvoiceDetails', $req);
 }
예제 #3
0
 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;
 }
예제 #4
0
 /**
  * @test
  */
 public function testSetServiceName()
 {
     $this->assertEquals('AdaptiveAccounts', $this->object->serviceName);
     $this->object->setServiceName('Invoice');
     $this->assertEquals('Invoice', $this->object->serviceName);
 }