try {
$list = \PayPal\Api\WebProfile::get_list(
$apiContext);
-}
catch (\PayPal\
Exception\PPConnectionException
$ex) {
+}
catch (\PayPal\
Exception\PayPalConnectionException
$ex) {
ResultPrinter::printError(
"Get List of All Web Profiles",
"Web Profiles",
null,
null,
$ex);
exit(
1);
}
diff --git a/sample/lipp/GenerateAccessTokenFromRefreshToken.php b/sample/lipp/GenerateAccessTokenFromRefreshToken.php
index 711df11..2ee0100 100644
--- a/sample/lipp/GenerateAccessTokenFromRefreshToken.php
+++ b/sample/lipp/GenerateAccessTokenFromRefreshToken.php
@@ -3,14 +3,14 @@
// ### Obtain Access Token From Refresh Token
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
+use PayPal\Api\OpenIdTokeninfo;
// You can retrieve the refresh token by executing ObtainUserConsent.php and store the refresh token
$refreshToken = 'yzX4AkmMyBKR4on7vB5he-tDu38s24Zy-kTibhSuqA8kTdy0Yinxj7NpAyULx0bxqC5G8dbXOt0aVMlMmtpiVmSzhcjVZhYDM7WUQLC9KpaXGBHyltJPkLLQkXE';
try {
- $tokenInfo = new PPOpenIdTokeninfo();
+ $tokenInfo = new OpenIdTokeninfo();
$tokenInfo = $tokenInfo->createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext);
} catch (Exception $ex) {
diff --git a/sample/lipp/GetUserInfo.php b/sample/lipp/GetUserInfo.php
index 45911ff..4e7140d 100644
--- a/sample/lipp/GetUserInfo.php
+++ b/sample/lipp/GetUserInfo.php
@@ -3,8 +3,8 @@
// ### Obtain Access Token From Refresh Token
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdUserinfo;
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
+use PayPal\Api\OpenIdUserinfo;
+use PayPal\Api\OpenIdTokeninfo;
// To obtain User Info, you have to follow three steps in general.
// First, you need to obtain user's consent to retrieve the information you want.
@@ -22,11 +22,11 @@ $refreshToken = 'yzX4AkmMyBKR4on7vB5he-tDu38s24Zy-kTibhSuqA8kTdy0Yinxj7NpAyULx0b
try {
- $tokenInfo = new PPOpenIdTokeninfo();
+ $tokenInfo = new OpenIdTokeninfo();
$tokenInfo = $tokenInfo->createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext);
$params = array('access_token' => $tokenInfo->getAccessToken());
- $userInfo = PPOpenIdUserinfo::getUserinfo($params, $apiContext);
+ $userInfo = OpenIdUserinfo::getUserinfo($params, $apiContext);
} catch (Exception $ex) {
ResultPrinter::printError("User Information", "User Info", null, $params, $ex);
diff --git a/sample/lipp/ObtainUserConsent.php b/sample/lipp/ObtainUserConsent.php
index f677e17..a6387c4 100644
--- a/sample/lipp/ObtainUserConsent.php
+++ b/sample/lipp/ObtainUserConsent.php
@@ -2,7 +2,7 @@
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdSession;
+use PayPal\Api\OpenIdSession;
$baseUrl = getBaseUrl() . '/UserConsentRedirect.php?success=true';
@@ -10,7 +10,7 @@ $baseUrl = getBaseUrl() . '/UserConsentRedirect.php?success=true';
// The clientId is stored in the bootstrap file
//Get Authorization URL returns the redirect URL that could be used to get user's consent
-$redirectUrl = PPOpenIdSession::getAuthorizationUrl(
+$redirectUrl = OpenIdSession::getAuthorizationUrl(
$baseUrl,
array('profile', 'email', 'phone'),
null,
diff --git a/sample/lipp/UserConsentRedirect.php b/sample/lipp/UserConsentRedirect.php
index 8ff487f..c97768f 100644
--- a/sample/lipp/UserConsentRedirect.php
+++ b/sample/lipp/UserConsentRedirect.php
@@ -2,8 +2,8 @@
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Api\OpenIdTokeninfo;
+use PayPal\Exception\PayPalConnectionException;
session_start();
@@ -16,8 +16,8 @@ if (isset($_GET['success']) && $_GET['success'] == 'true') {
try {
// Obtain Authorization Code from Code, Client ID and Client Secret
- $accessToken = PPOpenIdTokeninfo::createFromAuthorizationCode(array('code' => $code), null, null, $apiContext);
- } catch (PPConnectionException $ex) {
+ $accessToken = OpenIdTokeninfo::createFromAuthorizationCode(array('code' => $code), null, null, $apiContext);
+ } catch (PayPalConnectionException $ex) {
ResultPrinter::printError("Obtained Access Token", "Access Token", null, $_GET['code'], $ex);
exit(1);
}
diff --git a/sample/notifications/createWebhook.php b/sample/notifications/createWebhook.php
index af87d4c..b747e20 100644
--- a/sample/notifications/createWebhook.php
+++ b/sample/notifications/createWebhook.php
@@ -54,7 +54,7 @@ try {
$output = $webhook->create($apiContext);
} catch (Exception $ex) {
// ^ Ignore workflow code segment
- if ($ex instanceof \PayPal\Exception\PPConnectionException) {
+ if ($ex instanceof \PayPal\Exception\PayPalConnectionException) {
$data = $ex->getData();
ResultPrinter::printError("Created Webhook Failed. Checking if it is Webhook Number Limit Exceeded. Trying to delete all existing webhooks", "Webhook", "Please Use
Delete All Webhooks Sample to delete all existing webhooks in sample", $request, $ex);
if (strpos($data,'WEBHOOK_NUMBER_LIMIT_EXCEEDED') !== false) {
diff --git a/sample/payment-experience/CreateWebProfile.php b/sample/payment-experience/CreateWebProfile.php
index c2c769b..1b89adf 100644
--- a/sample/payment-experience/CreateWebProfile.php
+++ b/sample/payment-experience/CreateWebProfile.php
@@ -51,7 +51,7 @@ $request = clone $webProfile;
try {
// Use this call to create a profile.
$createProfileResponse = $webProfile->create($apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Created Web Profile", "Web Profile", null, $request, $ex);
exit(1);
}
diff --git a/sample/payment-experience/DeleteWebProfile.php b/sample/payment-experience/DeleteWebProfile.php
index f1a3753..37b6a9e 100644
--- a/sample/payment-experience/DeleteWebProfile.php
+++ b/sample/payment-experience/DeleteWebProfile.php
@@ -18,7 +18,7 @@ $webProfile->setId($createProfileResponse->getId());
try {
// Execute the delete method
$webProfile->delete($apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Deleted Web Profile", "Web Profile", $createProfileResponse->getId(), null, $ex);
exit(1);
}
diff --git a/sample/payment-experience/GetWebProfile.php b/sample/payment-experience/GetWebProfile.php
index 23e9f07..4e1db6c 100644
--- a/sample/payment-experience/GetWebProfile.php
+++ b/sample/payment-experience/GetWebProfile.php
@@ -14,7 +14,7 @@ $createProfileResponse = require 'CreateWebProfile.php';
try {
// If your request is successful, the API returns a web_profile object response that contains the profile details.
$webProfile = \PayPal\Api\WebProfile::get($createProfileResponse->getId(), $apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Get Web Profile", "Web Profile", $webProfile->getId(), null, $ex);
exit(1);
}
diff --git a/sample/payment-experience/ListWebProfiles.php b/sample/payment-experience/ListWebProfiles.php
index eaaa96e..5f84198 100644
--- a/sample/payment-experience/ListWebProfiles.php
+++ b/sample/payment-experience/ListWebProfiles.php
@@ -10,7 +10,7 @@ $apiContext = require __DIR__ . '/../bootstrap.php';
// (See bootstrap.php for more on `ApiContext`)
try {
$list = \PayPal\Api\WebProfile::get_list($apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Get List of All Web Profiles", "Web Profiles", null, null, $ex);
exit(1);
}
diff --git a/sample/sdk_config.ini b/sample/sdk_config.ini
index 54a6a5a..9199b36 100644
--- a/sample/sdk_config.ini
+++ b/sample/sdk_config.ini
@@ -38,7 +38,7 @@ log.LogLevel=FINE
;Validation Configuration
[validation]
-; If validation is set to strict, the PPModel would make sure that
+; If validation is set to strict, the PayPalModel would make sure that
; there are proper accessors (Getters and Setters) for each model
; objects. Accepted value is
; 'log' : logs the error message to logger only (default)
diff --git a/tests/PayPal/Test/Api/AddressTest.php b/tests/PayPal/Test/Api/AddressTest.php
index 39e1e39..5ff8132 100644
--- a/tests/PayPal/Test/Api/AddressTest.php
+++ b/tests/PayPal/Test/Api/AddressTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Address;
/**
diff --git a/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php b/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php
index 08e7a2c..c55a4c8 100644
--- a/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php
+++ b/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\AgreementStateDescriptor;
/**
diff --git a/tests/PayPal/Test/Api/AgreementTest.php b/tests/PayPal/Test/Api/AgreementTest.php
index 5e9a63f..026404f 100644
--- a/tests/PayPal/Test/Api/AgreementTest.php
+++ b/tests/PayPal/Test/Api/AgreementTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\AgreementTransactions;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Agreement;
/**
@@ -162,17 +162,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -181,17 +181,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testExecute($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->execute("123123", $mockApiContext, $mockPPRestCall);
+ $result = $obj->execute("123123", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -200,17 +200,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
AgreementTest::getJson()
));
- $result = $obj->get("agreementId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("agreementId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -219,18 +219,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -239,18 +239,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testSuspend($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->suspend($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->suspend($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -259,18 +259,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testReActivate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->reActivate($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->reActivate($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -279,18 +279,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testCancel($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->cancel($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->cancel($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -299,18 +299,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testBillBalance($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->billBalance($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->billBalance($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -319,18 +319,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testSetBalance($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$currency = CurrencyTest::getObject();
- $result = $obj->setBalance($currency, $mockApiContext, $mockPPRestCall);
+ $result = $obj->setBalance($currency, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -339,17 +339,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testTransactions($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
AgreementTransactionsTest::getJson()
));
- $result = $obj->transactions("agreementId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->transactions("agreementId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/AgreementTransactionTest.php b/tests/PayPal/Test/Api/AgreementTransactionTest.php
index a59b61d..db10c5d 100644
--- a/tests/PayPal/Test/Api/AgreementTransactionTest.php
+++ b/tests/PayPal/Test/Api/AgreementTransactionTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\AgreementTransaction;
/**
diff --git a/tests/PayPal/Test/Api/AgreementTransactionsTest.php b/tests/PayPal/Test/Api/AgreementTransactionsTest.php
index 11457f0..71367f7 100644
--- a/tests/PayPal/Test/Api/AgreementTransactionsTest.php
+++ b/tests/PayPal/Test/Api/AgreementTransactionsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\AgreementTransactions;
/**
diff --git a/tests/PayPal/Test/Api/AuthorizationTest.php b/tests/PayPal/Test/Api/AuthorizationTest.php
index 111657c..2ba23c7 100644
--- a/tests/PayPal/Test/Api/AuthorizationTest.php
+++ b/tests/PayPal/Test/Api/AuthorizationTest.php
@@ -14,7 +14,7 @@ use PayPal\Api\CreditCard;
use PayPal\Api\Payment;
use PayPal\Api\FundingInstrument;
use PayPal\Api\Transaction;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConnectionException;
class AuthorizationTest extends \PHPUnit_Framework_TestCase
{
@@ -165,7 +165,7 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
} catch (\InvalidArgumentException $ex) {
$this->assertEquals($ex->getMessage(), "Id cannot be null");
}
- } catch (PPConnectionException $ex) {
+ } catch (PayPalConnectionException $ex) {
$this->markTestSkipped(
'Tests failing because of intermittent failures in Paypal Sandbox environment.' . $ex->getMessage()
);
@@ -186,7 +186,7 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
$authorization->setAmount($amount);
try {
$authorization->reauthorize();
- } catch (PPConnectionException $ex) {
+ } catch (PayPalConnectionException $ex) {
//var_dump($ex->getMessage());
$this->assertEquals(strpos($ex->getMessage(), "500"), false);
}
diff --git a/tests/PayPal/Test/Api/BankAccountTest.php b/tests/PayPal/Test/Api/BankAccountTest.php
index dd8814b..1be51a7 100644
--- a/tests/PayPal/Test/Api/BankAccountTest.php
+++ b/tests/PayPal/Test/Api/BankAccountTest.php
@@ -2,10 +2,10 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\BankAccount;
/**
@@ -318,17 +318,17 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -337,17 +337,17 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
BankAccountTest::getJson()
));
- $result = $obj->get("bankAccountId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("bankAccountId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -356,17 +356,17 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -375,18 +375,18 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/BankAccountsListTest.php b/tests/PayPal/Test/Api/BankAccountsListTest.php
index 010498d..efc1889 100644
--- a/tests/PayPal/Test/Api/BankAccountsListTest.php
+++ b/tests/PayPal/Test/Api/BankAccountsListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\BankAccountsList;
/**
diff --git a/tests/PayPal/Test/Api/BankTokenTest.php b/tests/PayPal/Test/Api/BankTokenTest.php
index e462af3..d26b158 100644
--- a/tests/PayPal/Test/Api/BankTokenTest.php
+++ b/tests/PayPal/Test/Api/BankTokenTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\BankToken;
/**
diff --git a/tests/PayPal/Test/Api/BillingInfoTest.php b/tests/PayPal/Test/Api/BillingInfoTest.php
index 2e02be2..6aeec9f 100644
--- a/tests/PayPal/Test/Api/BillingInfoTest.php
+++ b/tests/PayPal/Test/Api/BillingInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\BillingInfo;
/**
diff --git a/tests/PayPal/Test/Api/CancelNotificationTest.php b/tests/PayPal/Test/Api/CancelNotificationTest.php
index b3136e3..0c4590a 100644
--- a/tests/PayPal/Test/Api/CancelNotificationTest.php
+++ b/tests/PayPal/Test/Api/CancelNotificationTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CancelNotification;
/**
diff --git a/tests/PayPal/Test/Api/CaptureTest.php b/tests/PayPal/Test/Api/CaptureTest.php
index 8cc8748..2a1fba3 100644
--- a/tests/PayPal/Test/Api/CaptureTest.php
+++ b/tests/PayPal/Test/Api/CaptureTest.php
@@ -5,7 +5,7 @@ use PayPal\Api\Capture;
use PayPal\Api\Refund;
use PayPal\Api\Authorization;
use PayPal\Api\Amount;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConnectionException;
use PayPal\Test\Constants;
class CaptureTest extends \PHPUnit_Framework_TestCase
@@ -91,7 +91,7 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
$retund = $capture->refund($refund);
$this->assertNotNull($retund->getId());
- } catch (PPConnectionException $ex) {
+ } catch (PayPalConnectionException $ex) {
$this->markTestSkipped(
'Tests failing because of intermittent failures in Paypal Sandbox environment.' . $ex->getMessage()
);
diff --git a/tests/PayPal/Test/Api/ChargeModelTest.php b/tests/PayPal/Test/Api/ChargeModelTest.php
index be3e005..a20a625 100644
--- a/tests/PayPal/Test/Api/ChargeModelTest.php
+++ b/tests/PayPal/Test/Api/ChargeModelTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ChargeModel;
/**
diff --git a/tests/PayPal/Test/Api/CostTest.php b/tests/PayPal/Test/Api/CostTest.php
index dfd623c..6ca7228 100644
--- a/tests/PayPal/Test/Api/CostTest.php
+++ b/tests/PayPal/Test/Api/CostTest.php
@@ -2,8 +2,8 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\FormatConverter;
+use PayPal\Common\PayPalModel;
+use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
use PayPal\Api\Cost;
diff --git a/tests/PayPal/Test/Api/CreateProfileResponseTest.php b/tests/PayPal/Test/Api/CreateProfileResponseTest.php
index 5656eb6..7e8a51c 100644
--- a/tests/PayPal/Test/Api/CreateProfileResponseTest.php
+++ b/tests/PayPal/Test/Api/CreateProfileResponseTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CreateProfileResponse;
/**
diff --git a/tests/PayPal/Test/Api/CreditCardListTest.php b/tests/PayPal/Test/Api/CreditCardListTest.php
index e3467cd..dd44684 100644
--- a/tests/PayPal/Test/Api/CreditCardListTest.php
+++ b/tests/PayPal/Test/Api/CreditCardListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CreditCardList;
/**
diff --git a/tests/PayPal/Test/Api/CreditCardTest.php b/tests/PayPal/Test/Api/CreditCardTest.php
index a10b458..09adb7c 100644
--- a/tests/PayPal/Test/Api/CreditCardTest.php
+++ b/tests/PayPal/Test/Api/CreditCardTest.php
@@ -2,10 +2,10 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\CreditCard;
/**
@@ -192,17 +192,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -211,17 +211,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
CreditCardTest::getJson()
));
- $result = $obj->get("creditCardId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("creditCardId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -230,17 +230,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -249,17 +249,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->update($mockApiContext, $mockPPRestCall);
+ $result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/CreditCardTokenTest.php b/tests/PayPal/Test/Api/CreditCardTokenTest.php
index 24abf6e..de8facc 100644
--- a/tests/PayPal/Test/Api/CreditCardTokenTest.php
+++ b/tests/PayPal/Test/Api/CreditCardTokenTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CreditCardToken;
/**
diff --git a/tests/PayPal/Test/Api/CreditTest.php b/tests/PayPal/Test/Api/CreditTest.php
index 419cb80..9aca208 100644
--- a/tests/PayPal/Test/Api/CreditTest.php
+++ b/tests/PayPal/Test/Api/CreditTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Credit;
/**
diff --git a/tests/PayPal/Test/Api/CurrencyTest.php b/tests/PayPal/Test/Api/CurrencyTest.php
index bb941d7..1b3254e 100644
--- a/tests/PayPal/Test/Api/CurrencyTest.php
+++ b/tests/PayPal/Test/Api/CurrencyTest.php
@@ -2,8 +2,8 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\FormatConverter;
+use PayPal\Common\PayPalModel;
+use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
use PayPal\Api\Currency;
diff --git a/tests/PayPal/Test/Api/CustomAmountTest.php b/tests/PayPal/Test/Api/CustomAmountTest.php
index a870479..7f971bc 100644
--- a/tests/PayPal/Test/Api/CustomAmountTest.php
+++ b/tests/PayPal/Test/Api/CustomAmountTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CustomAmount;
/**
diff --git a/tests/PayPal/Test/Api/ErrorDetailsTest.php b/tests/PayPal/Test/Api/ErrorDetailsTest.php
index f49c199..aa7e678 100644
--- a/tests/PayPal/Test/Api/ErrorDetailsTest.php
+++ b/tests/PayPal/Test/Api/ErrorDetailsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ErrorDetails;
/**
diff --git a/tests/PayPal/Test/Api/ErrorTest.php b/tests/PayPal/Test/Api/ErrorTest.php
index 1270e27..744fa25 100644
--- a/tests/PayPal/Test/Api/ErrorTest.php
+++ b/tests/PayPal/Test/Api/ErrorTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Error;
/**
diff --git a/tests/PayPal/Test/Api/ExtendedBankAccountTest.php b/tests/PayPal/Test/Api/ExtendedBankAccountTest.php
index 533006c..a2af11b 100644
--- a/tests/PayPal/Test/Api/ExtendedBankAccountTest.php
+++ b/tests/PayPal/Test/Api/ExtendedBankAccountTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ExtendedBankAccount;
/**
diff --git a/tests/PayPal/Test/Api/FlowConfigTest.php b/tests/PayPal/Test/Api/FlowConfigTest.php
index 8df6953..50ca5d4 100644
--- a/tests/PayPal/Test/Api/FlowConfigTest.php
+++ b/tests/PayPal/Test/Api/FlowConfigTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\FlowConfig;
/**
diff --git a/tests/PayPal/Test/Api/FundingInstrumentTest.php b/tests/PayPal/Test/Api/FundingInstrumentTest.php
index 1844cd9..0e68360 100644
--- a/tests/PayPal/Test/Api/FundingInstrumentTest.php
+++ b/tests/PayPal/Test/Api/FundingInstrumentTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\FundingInstrument;
/**
diff --git a/tests/PayPal/Test/Api/HyperSchemaTest.php b/tests/PayPal/Test/Api/HyperSchemaTest.php
index 6a8a724..61dde52 100644
--- a/tests/PayPal/Test/Api/HyperSchemaTest.php
+++ b/tests/PayPal/Test/Api/HyperSchemaTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\HyperSchema;
/**
diff --git a/tests/PayPal/Test/Api/ImageTest.php b/tests/PayPal/Test/Api/ImageTest.php
index 7d93ad7..aa310f6 100644
--- a/tests/PayPal/Test/Api/ImageTest.php
+++ b/tests/PayPal/Test/Api/ImageTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Image;
/**
diff --git a/tests/PayPal/Test/Api/InputFieldsTest.php b/tests/PayPal/Test/Api/InputFieldsTest.php
index a19be98..8a84fa0 100644
--- a/tests/PayPal/Test/Api/InputFieldsTest.php
+++ b/tests/PayPal/Test/Api/InputFieldsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InputFields;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceAddressTest.php b/tests/PayPal/Test/Api/InvoiceAddressTest.php
index 109e08f..1e39684 100644
--- a/tests/PayPal/Test/Api/InvoiceAddressTest.php
+++ b/tests/PayPal/Test/Api/InvoiceAddressTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InvoiceAddress;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceItemTest.php b/tests/PayPal/Test/Api/InvoiceItemTest.php
index 28ee892..7daa1a5 100644
--- a/tests/PayPal/Test/Api/InvoiceItemTest.php
+++ b/tests/PayPal/Test/Api/InvoiceItemTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InvoiceItem;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php b/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php
index d45effa..0d0365f 100644
--- a/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php
+++ b/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InvoiceSearchResponse;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceTest.php b/tests/PayPal/Test/Api/InvoiceTest.php
index 41b1e3a..8d8c8e8 100644
--- a/tests/PayPal/Test/Api/InvoiceTest.php
+++ b/tests/PayPal/Test/Api/InvoiceTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\InvoiceSearchResponse;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Invoice;
/**
@@ -263,17 +263,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -282,18 +282,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testSearch($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
InvoiceSearchResponseTest::getJson()
));
$search = SearchTest::getObject();
- $result = $obj->search($search, $mockApiContext, $mockPPRestCall);
+ $result = $obj->search($search, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -302,17 +302,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testSend($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->send($mockApiContext, $mockPPRestCall);
+ $result = $obj->send($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -321,18 +321,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testRemind($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$notification = NotificationTest::getObject();
- $result = $obj->remind($notification, $mockApiContext, $mockPPRestCall);
+ $result = $obj->remind($notification, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -341,18 +341,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testCancel($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$cancelNotification = CancelNotificationTest::getObject();
- $result = $obj->cancel($cancelNotification, $mockApiContext, $mockPPRestCall);
+ $result = $obj->cancel($cancelNotification, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -361,18 +361,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testRecordPayment($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$paymentDetail = PaymentDetailTest::getObject();
- $result = $obj->recordPayment($paymentDetail, $mockApiContext, $mockPPRestCall);
+ $result = $obj->recordPayment($paymentDetail, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -381,18 +381,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testRecordRefund($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$refundDetail = RefundDetailTest::getObject();
- $result = $obj->recordRefund($refundDetail, $mockApiContext, $mockPPRestCall);
+ $result = $obj->recordRefund($refundDetail, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -401,17 +401,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
InvoiceTest::getJson()
));
- $result = $obj->get("invoiceId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("invoiceId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -420,17 +420,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
InvoiceSearchResponseTest::getJson()
));
- $result = $obj->getAll(array(), $mockApiContext, $mockPPRestCall);
+ $result = $obj->getAll(array(), $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -439,17 +439,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->update($mockApiContext, $mockPPRestCall);
+ $result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -458,17 +458,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -477,17 +477,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testQrCode($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
ImageTest::getJson()
));
- $result = $obj->qrCode("invoiceId", array(), $mockApiContext, $mockPPRestCall);
+ $result = $obj->qrCode("invoiceId", array(), $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/LinksTest.php b/tests/PayPal/Test/Api/LinksTest.php
index 793826e..07a5491 100644
--- a/tests/PayPal/Test/Api/LinksTest.php
+++ b/tests/PayPal/Test/Api/LinksTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Links;
/**
diff --git a/tests/PayPal/Test/Api/MerchantInfoTest.php b/tests/PayPal/Test/Api/MerchantInfoTest.php
index 11186e6..885577e 100644
--- a/tests/PayPal/Test/Api/MerchantInfoTest.php
+++ b/tests/PayPal/Test/Api/MerchantInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\MerchantInfo;
/**
diff --git a/tests/PayPal/Test/Api/MerchantPreferencesTest.php b/tests/PayPal/Test/Api/MerchantPreferencesTest.php
index f7b925e..0ae5987 100644
--- a/tests/PayPal/Test/Api/MerchantPreferencesTest.php
+++ b/tests/PayPal/Test/Api/MerchantPreferencesTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\MerchantPreferences;
/**
diff --git a/tests/PayPal/Test/Api/MetadataTest.php b/tests/PayPal/Test/Api/MetadataTest.php
index bce0d61..ff52a74 100644
--- a/tests/PayPal/Test/Api/MetadataTest.php
+++ b/tests/PayPal/Test/Api/MetadataTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Metadata;
/**
diff --git a/tests/PayPal/Test/Api/NotificationTest.php b/tests/PayPal/Test/Api/NotificationTest.php
index 8b9bebe..bc6fee1 100644
--- a/tests/PayPal/Test/Api/NotificationTest.php
+++ b/tests/PayPal/Test/Api/NotificationTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Notification;
/**
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdAddressTest.php b/tests/PayPal/Test/Api/OpenIdAddressTest.php
similarity index 77%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdAddressTest.php
rename to tests/PayPal/Test/Api/OpenIdAddressTest.php
index 8875296..1079d34 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdAddressTest.php
+++ b/tests/PayPal/Test/Api/OpenIdAddressTest.php
@@ -1,14 +1,16 @@
setCountry("US")->setLocality("San Jose")
->setPostalCode("95112")->setRegion("CA")
->setStreetAddress("1, North 1'st street");
@@ -42,7 +44,7 @@ class PPOpenIdAddressTest extends \PHPUnit_Framework_TestCase
*/
public function testSerializationDeserialization()
{
- $addrCopy = new PPOpenIdAddress();
+ $addrCopy = new OpenIdAddress();
$addrCopy->fromJson($this->addr->toJson());
$this->assertEquals($this->addr, $addrCopy);
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdErrorTest.php b/tests/PayPal/Test/Api/OpenIdErrorTest.php
similarity index 75%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdErrorTest.php
rename to tests/PayPal/Test/Api/OpenIdErrorTest.php
index 635d329..1d938c3 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdErrorTest.php
+++ b/tests/PayPal/Test/Api/OpenIdErrorTest.php
@@ -1,15 +1,17 @@
error = new PPOpenIdError();
+ $this->error = new OpenIdError();
$this->error->setErrorDescription('error description')
->setErrorUri('http://developer.paypal.com/api/error')
->setError('VALIDATION_ERROR');
@@ -37,7 +39,7 @@ class PPOpenIdErrorTest extends PHPUnit_Framework_TestCase
*/
public function testSerializationDeserialization()
{
- $errorCopy = new PPOpenIdError();
+ $errorCopy = new OpenIdError();
$errorCopy->fromJson($this->error->toJson());
$this->assertEquals($this->error, $errorCopy);
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdSessionTest.php b/tests/PayPal/Test/Api/OpenIdSessionTest.php
similarity index 75%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdSessionTest.php
rename to tests/PayPal/Test/Api/OpenIdSessionTest.php
index 862a532..ee209f9 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdSessionTest.php
+++ b/tests/PayPal/Test/Api/OpenIdSessionTest.php
@@ -1,12 +1,15 @@
context = new \PayPal\Rest\ApiContext();
+ $this->context = new ApiContext();
$this->context->setConfig(
array(
'acct1.ClientId' => 'DummyId',
@@ -49,16 +52,16 @@ class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - custom scope");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - custom scope");
$scope = array();
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=openid+profile+address+email+phone+" . urlencode("https://uri.paypal.com/services/paypalattributes") . "+" . urlencode('https://uri.paypal.com/services/expresscheckout') . "&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - default scope");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - default scope");
$scope = array('openid');
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=openid&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - openid scope");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - openid scope");
}
/**
@@ -73,7 +76,7 @@ class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
$this->assertEquals($expectedBaseUrl . "?client_id=DummyId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, "DummyId", null, null, $this->context), "Failed case - custom config");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, "DummyId", null, null, $this->context), "Failed case - custom config");
}
/**
@@ -88,6 +91,6 @@ class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/endsession";
$this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true",
- PPOpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
+ OpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
}
}
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdTokeninfoTest.php b/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php
similarity index 82%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdTokeninfoTest.php
rename to tests/PayPal/Test/Api/OpenIdTokeninfoTest.php
index 54e90dc..e22f431 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdTokeninfoTest.php
+++ b/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php
@@ -1,14 +1,16 @@
token = new PPOpenIdTokeninfo();
+ $this->token = new OpenIdTokeninfo();
$this->token->setAccessToken("Access token")
->setExpiresIn(900)
->setRefreshToken("Refresh token")
@@ -39,7 +41,7 @@ class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase
*/
public function testSerializationDeserialization()
{
- $tokenCopy = new PPOpenIdTokeninfo();
+ $tokenCopy = new OpenIdTokeninfo();
$tokenCopy->fromJson($this->token->toJson());
$this->assertEquals($this->token, $tokenCopy);
@@ -61,7 +63,7 @@ class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase
'client_id' => $clientId,
'client_secret' => $clientSecret
);
- $accessToken = PPOpenIdTokeninfo::createFromAuthorizationCode($params);
+ $accessToken = OpenIdTokeninfo::createFromAuthorizationCode($params);
$this->assertNotNull($accessToken);
$params = array(
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdUserinfoTest.php b/tests/PayPal/Test/Api/OpenIdUserinfoTest.php
similarity index 74%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdUserinfoTest.php
rename to tests/PayPal/Test/Api/OpenIdUserinfoTest.php
index 0775177..8c543b1 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdUserinfoTest.php
+++ b/tests/PayPal/Test/Api/OpenIdUserinfoTest.php
@@ -1,11 +1,14 @@
setAccountType("PERSONAL")->setAgeRange("20-30")->setBirthday("1970-01-01")
->setEmail("me@email.com")->setEmailVerified(true)
->setFamilyName("Doe")->setMiddleName("A")->setGivenName("John")
@@ -41,9 +44,9 @@ class PPOpenIdUserinfoTest extends \PHPUnit_Framework_TestCase
->setSub("me@email.com")->setUserId("userId")
->setVerified(true)->setVerifiedAccount(true)
->setZoneinfo("America/PST")->setLanguage('en_US')
- ->setAddress(PPOpenIdAddressTest::getTestData());
+ ->setAddress(OpenIdAddressTest::getTestData());
- $userCopy = new PPOpenIdUserinfo();
+ $userCopy = new OpenIdUserinfo();
$userCopy->fromJson($user->toJSON());
$this->assertEquals($user, $userCopy);
@@ -54,7 +57,7 @@ class PPOpenIdUserinfoTest extends \PHPUnit_Framework_TestCase
*/
public function testInvalidParamUserInfoCall()
{
- $this->setExpectedException('PayPal\Exception\PPConnectionException');
- PPOpenIdUserinfo::getUserinfo(array('access_token' => 'accessToken'));
+ $this->setExpectedException('PayPal\Exception\PayPalConnectionException');
+ OpenIdUserinfo::getUserinfo(array('access_token' => 'accessToken'));
}
}
diff --git a/tests/PayPal/Test/Api/OverrideChargeModelTest.php b/tests/PayPal/Test/Api/OverrideChargeModelTest.php
index c12d22b..c2cd8e4 100644
--- a/tests/PayPal/Test/Api/OverrideChargeModelTest.php
+++ b/tests/PayPal/Test/Api/OverrideChargeModelTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\OverrideChargeModel;
/**
diff --git a/tests/PayPal/Test/Api/PatchRequestTest.php b/tests/PayPal/Test/Api/PatchRequestTest.php
index 6c40b6a..23decf7 100644
--- a/tests/PayPal/Test/Api/PatchRequestTest.php
+++ b/tests/PayPal/Test/Api/PatchRequestTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PatchRequest;
/**
diff --git a/tests/PayPal/Test/Api/PatchTest.php b/tests/PayPal/Test/Api/PatchTest.php
index b9f597c..633e726 100644
--- a/tests/PayPal/Test/Api/PatchTest.php
+++ b/tests/PayPal/Test/Api/PatchTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Patch;
/**
diff --git a/tests/PayPal/Test/Api/PayerInfoTest.php b/tests/PayPal/Test/Api/PayerInfoTest.php
index 49c00ef..2b9c765 100644
--- a/tests/PayPal/Test/Api/PayerInfoTest.php
+++ b/tests/PayPal/Test/Api/PayerInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PayerInfo;
/**
diff --git a/tests/PayPal/Test/Api/PayerTest.php b/tests/PayPal/Test/Api/PayerTest.php
index f56b32d..235583d 100644
--- a/tests/PayPal/Test/Api/PayerTest.php
+++ b/tests/PayPal/Test/Api/PayerTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Payer;
/**
diff --git a/tests/PayPal/Test/Api/PaymentCardTest.php b/tests/PayPal/Test/Api/PaymentCardTest.php
index 6317de8..564b7d2 100644
--- a/tests/PayPal/Test/Api/PaymentCardTest.php
+++ b/tests/PayPal/Test/Api/PaymentCardTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentCard;
/**
diff --git a/tests/PayPal/Test/Api/PaymentCardTokenTest.php b/tests/PayPal/Test/Api/PaymentCardTokenTest.php
index ffed8f5..132743a 100644
--- a/tests/PayPal/Test/Api/PaymentCardTokenTest.php
+++ b/tests/PayPal/Test/Api/PaymentCardTokenTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentCardToken;
/**
diff --git a/tests/PayPal/Test/Api/PaymentDefinitionTest.php b/tests/PayPal/Test/Api/PaymentDefinitionTest.php
index 3a05c76..74f0e89 100644
--- a/tests/PayPal/Test/Api/PaymentDefinitionTest.php
+++ b/tests/PayPal/Test/Api/PaymentDefinitionTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentDefinition;
/**
diff --git a/tests/PayPal/Test/Api/PaymentDetailTest.php b/tests/PayPal/Test/Api/PaymentDetailTest.php
index a01e533..f299c37 100644
--- a/tests/PayPal/Test/Api/PaymentDetailTest.php
+++ b/tests/PayPal/Test/Api/PaymentDetailTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentDetail;
/**
diff --git a/tests/PayPal/Test/Api/PaymentTermTest.php b/tests/PayPal/Test/Api/PaymentTermTest.php
index 0cd8e73..573af12 100644
--- a/tests/PayPal/Test/Api/PaymentTermTest.php
+++ b/tests/PayPal/Test/Api/PaymentTermTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentTerm;
/**
diff --git a/tests/PayPal/Test/Api/PhoneTest.php b/tests/PayPal/Test/Api/PhoneTest.php
index 00ce876..9e7903c 100644
--- a/tests/PayPal/Test/Api/PhoneTest.php
+++ b/tests/PayPal/Test/Api/PhoneTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Phone;
/**
diff --git a/tests/PayPal/Test/Api/PlanListTest.php b/tests/PayPal/Test/Api/PlanListTest.php
index 7649bec..f0ca05f 100644
--- a/tests/PayPal/Test/Api/PlanListTest.php
+++ b/tests/PayPal/Test/Api/PlanListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PlanList;
/**
diff --git a/tests/PayPal/Test/Api/PlanTest.php b/tests/PayPal/Test/Api/PlanTest.php
index d295086..e0edbbd 100644
--- a/tests/PayPal/Test/Api/PlanTest.php
+++ b/tests/PayPal/Test/Api/PlanTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\PlanList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Plan;
/**
@@ -140,17 +140,17 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PlanTest::getJson()
));
- $result = $obj->get("planId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("planId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -159,17 +159,17 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -178,18 +178,18 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -198,18 +198,18 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testList($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PlanListTest::getJson()
));
$params = ParamsTest::getObject();
- $result = $obj->all($params, $mockApiContext, $mockPPRestCall);
+ $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/PresentationTest.php b/tests/PayPal/Test/Api/PresentationTest.php
index 26fdbd0..4603e20 100644
--- a/tests/PayPal/Test/Api/PresentationTest.php
+++ b/tests/PayPal/Test/Api/PresentationTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Presentation;
/**
diff --git a/tests/PayPal/Test/Api/RefundDetailTest.php b/tests/PayPal/Test/Api/RefundDetailTest.php
index 8de6252..3ff56b3 100644
--- a/tests/PayPal/Test/Api/RefundDetailTest.php
+++ b/tests/PayPal/Test/Api/RefundDetailTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\RefundDetail;
/**
diff --git a/tests/PayPal/Test/Api/SaleTest.php b/tests/PayPal/Test/Api/SaleTest.php
index c51e044..79972e0 100644
--- a/tests/PayPal/Test/Api/SaleTest.php
+++ b/tests/PayPal/Test/Api/SaleTest.php
@@ -7,7 +7,7 @@ use PayPal\Test\Constants;
use PayPal\Test\Api\AmountTest;
use PayPal\Test\Api\PaymentTest;
use PayPal\Test\Api\LinksTest;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConnectionException;
class SaleTest extends \PHPUnit_Framework_TestCase
{
diff --git a/tests/PayPal/Test/Api/SearchTest.php b/tests/PayPal/Test/Api/SearchTest.php
index 30aac6a..ce8ec2a 100644
--- a/tests/PayPal/Test/Api/SearchTest.php
+++ b/tests/PayPal/Test/Api/SearchTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Search;
/**
diff --git a/tests/PayPal/Test/Api/ShippingAddressTest.php b/tests/PayPal/Test/Api/ShippingAddressTest.php
index 7634bd8..37d729b 100644
--- a/tests/PayPal/Test/Api/ShippingAddressTest.php
+++ b/tests/PayPal/Test/Api/ShippingAddressTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ShippingAddress;
/**
diff --git a/tests/PayPal/Test/Api/ShippingCostTest.php b/tests/PayPal/Test/Api/ShippingCostTest.php
index ed3fbf8..3dca5ff 100644
--- a/tests/PayPal/Test/Api/ShippingCostTest.php
+++ b/tests/PayPal/Test/Api/ShippingCostTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ShippingCost;
/**
diff --git a/tests/PayPal/Test/Api/ShippingInfoTest.php b/tests/PayPal/Test/Api/ShippingInfoTest.php
index df3b72a..4d22b27 100644
--- a/tests/PayPal/Test/Api/ShippingInfoTest.php
+++ b/tests/PayPal/Test/Api/ShippingInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ShippingInfo;
/**
diff --git a/tests/PayPal/Test/Api/TaxTest.php b/tests/PayPal/Test/Api/TaxTest.php
index 48d62ed..8650b51 100644
--- a/tests/PayPal/Test/Api/TaxTest.php
+++ b/tests/PayPal/Test/Api/TaxTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Tax;
/**
diff --git a/tests/PayPal/Test/Api/TermsTest.php b/tests/PayPal/Test/Api/TermsTest.php
index 6ab14cb..f2ecd58 100644
--- a/tests/PayPal/Test/Api/TermsTest.php
+++ b/tests/PayPal/Test/Api/TermsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Terms;
/**
diff --git a/tests/PayPal/Test/Api/WebProfileTest.php b/tests/PayPal/Test/Api/WebProfileTest.php
index 9adf308..2383638 100644
--- a/tests/PayPal/Test/Api/WebProfileTest.php
+++ b/tests/PayPal/Test/Api/WebProfileTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\CreateProfileResponse;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -110,17 +110,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
CreateProfileResponseTest::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -129,17 +129,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->update($mockApiContext, $mockPPRestCall);
+ $result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -148,18 +148,18 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testPartialUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$patch = array(PatchTest::getObject());
- $result = $obj->partial_update($patch, $mockApiContext, $mockPPRestCall);
+ $result = $obj->partial_update($patch, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -168,17 +168,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebProfileTest::getJson()
));
- $result = $obj->get("profileId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("profileId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -187,17 +187,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
json_encode(array(json_decode(WebProfileTest::getJson())))
));
- $result = $obj->get_list($mockApiContext, $mockPPRestCall);
+ $result = $obj->get_list($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -206,17 +206,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/WebhookEventListTest.php b/tests/PayPal/Test/Api/WebhookEventListTest.php
index 759735b..82c5703 100644
--- a/tests/PayPal/Test/Api/WebhookEventListTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\WebhookEventList;
/**
diff --git a/tests/PayPal/Test/Api/WebhookEventTest.php b/tests/PayPal/Test/Api/WebhookEventTest.php
index d009203..12212b5 100644
--- a/tests/PayPal/Test/Api/WebhookEventTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebhookEvent;
/**
@@ -123,17 +123,17 @@ class WebhookEventTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventTest::getJson()
));
- $result = $obj->get("eventId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -142,17 +142,17 @@ class WebhookEventTest extends \PHPUnit_Framework_TestCase
*/
public function testResend($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->resend($mockApiContext, $mockPPRestCall);
+ $result = $obj->resend($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -161,18 +161,18 @@ class WebhookEventTest extends \PHPUnit_Framework_TestCase
*/
public function testList($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventListTest::getJson()
));
$params = array();
- $result = $obj->all($params, $mockApiContext, $mockPPRestCall);
+ $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/WebhookEventTypeListTest.php b/tests/PayPal/Test/Api/WebhookEventTypeListTest.php
index b2cc342..9382c8f 100644
--- a/tests/PayPal/Test/Api/WebhookEventTypeListTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventTypeListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\WebhookEventTypeList;
/**
diff --git a/tests/PayPal/Test/Api/WebhookEventTypeTest.php b/tests/PayPal/Test/Api/WebhookEventTypeTest.php
index c311f48..b1202fe 100644
--- a/tests/PayPal/Test/Api/WebhookEventTypeTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventTypeTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebhookEventType;
/**
@@ -86,17 +86,17 @@ class WebhookEventTypeTest extends \PHPUnit_Framework_TestCase
*/
public function testSubscribedEventTypes($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventTypeListTest::getJson()
));
- $result = $obj->subscribedEventTypes("webhookId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->subscribedEventTypes("webhookId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -105,17 +105,17 @@ class WebhookEventTypeTest extends \PHPUnit_Framework_TestCase
*/
public function testAvailableEventTypes($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventTypeListTest::getJson()
));
- $result = $obj->availableEventTypes($mockApiContext, $mockPPRestCall);
+ $result = $obj->availableEventTypes($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/WebhookListTest.php b/tests/PayPal/Test/Api/WebhookListTest.php
index 74ab8b6..ae94e15 100644
--- a/tests/PayPal/Test/Api/WebhookListTest.php
+++ b/tests/PayPal/Test/Api/WebhookListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\WebhookList;
/**
diff --git a/tests/PayPal/Test/Api/WebhookTest.php b/tests/PayPal/Test/Api/WebhookTest.php
index e849d77..35d9255 100644
--- a/tests/PayPal/Test/Api/WebhookTest.php
+++ b/tests/PayPal/Test/Api/WebhookTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Webhook;
/**
@@ -108,17 +108,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -127,17 +127,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookTest::getJson()
));
- $result = $obj->get("webhookId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("webhookId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -146,17 +146,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookListTest::getJson()
));
- $result = $obj->getAll($mockApiContext, $mockPPRestCall);
+ $result = $obj->getAll($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -165,18 +165,18 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -185,17 +185,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php b/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
index d28313e..b68fa7a 100644
--- a/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
+++ b/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
@@ -1,38 +1,38 @@
-getConfigHashmap();
- $token = $cred->getAccessToken($config);
- $this->assertNotNull($token);
-
- // Check that we get the same token when issuing a new call before token expiry
- $newToken = $cred->getAccessToken($config);
- $this->assertNotNull($newToken);
- $this->assertEquals($token, $newToken);
- }
-
- /**
- * @group integration
- */
- public function testInvalidCredentials()
- {
- $this->setExpectedException('PayPal\Exception\PPConnectionException');
- $cred = new OAuthTokenCredential('dummy', 'secret');
- $this->assertNull($cred->getAccessToken(PPConfigManager::getInstance()->getConfigHashmap()));
- }
-}
\ No newline at end of file
+getConfigHashmap();
+ $token = $cred->getAccessToken($config);
+ $this->assertNotNull($token);
+
+ // Check that we get the same token when issuing a new call before token expiry
+ $newToken = $cred->getAccessToken($config);
+ $this->assertNotNull($newToken);
+ $this->assertEquals($token, $newToken);
+ }
+
+ /**
+ * @group integration
+ */
+ public function testInvalidCredentials()
+ {
+ $this->setExpectedException('PayPal\Exception\PayPalConnectionException');
+ $cred = new OAuthTokenCredential('dummy', 'secret');
+ $this->assertNull($cred->getAccessToken(PayPalConfigManager::getInstance()->getConfigHashmap()));
+ }
+}
diff --git a/tests/PayPal/Test/Common/ArrayClass.php b/tests/PayPal/Test/Common/ArrayClass.php
index 1cada16..2b589c2 100644
--- a/tests/PayPal/Test/Common/ArrayClass.php
+++ b/tests/PayPal/Test/Common/ArrayClass.php
@@ -1,9 +1,9 @@
tags;
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/ArrayUtilTest.php b/tests/PayPal/Test/Common/ArrayUtilTest.php
index 84926f2..0c353b0 100644
--- a/tests/PayPal/Test/Common/ArrayUtilTest.php
+++ b/tests/PayPal/Test/Common/ArrayUtilTest.php
@@ -1,24 +1,24 @@
-assertEquals(false, PPArrayUtil::isAssocArray($arr));
-
- $arr = array(
- 'name' => 'John Doe',
- 'City' => 'San Jose'
- );
- $this->assertEquals(true, PPArrayUtil::isAssocArray($arr));
-
- $arr[] = 'CA';
- $this->assertEquals(false, PPArrayUtil::isAssocArray($arr));
- }
-}
+assertEquals(false, ArrayUtil::isAssocArray($arr));
+
+ $arr = array(
+ 'name' => 'John Doe',
+ 'City' => 'San Jose'
+ );
+ $this->assertEquals(true, ArrayUtil::isAssocArray($arr));
+
+ $arr[] = 'CA';
+ $this->assertEquals(false, ArrayUtil::isAssocArray($arr));
+ }
+}
diff --git a/tests/PayPal/Test/Common/ChildClass.php b/tests/PayPal/Test/Common/ChildClass.php
index d12e072..0443857 100644
--- a/tests/PayPal/Test/Common/ChildClass.php
+++ b/tests/PayPal/Test/Common/ChildClass.php
@@ -1,9 +1,9 @@
invalid = "value2";
$this->assertEquals($obj->invalid, "value2");
- if (PPConfigManager::getInstance()->get('validation.level') == 'strict') {
+ if (PayPalConfigManager::getInstance()->get('validation.level') == 'strict') {
$this->fail("It should have thrown a Notice Error");
}
} catch (\PHPUnit_Framework_Error_Notice $ex) {
@@ -100,7 +100,7 @@ class ModelTest extends \PHPUnit_Framework_TestCase
public function testInvalidMagicMethodWithDisabledValidation()
{
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled'));
$obj = new SimpleClass();
try {
$obj->invalid = "value2";
@@ -108,16 +108,16 @@ class ModelTest extends \PHPUnit_Framework_TestCase
} catch (\PHPUnit_Framework_Error_Notice $ex) {
$this->fail("It should not have thrown a Notice Error as it is disabled.");
}
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
}
public function testInvalidMagicMethodWithValidationLevel()
{
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'log'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'log'));
$obj = new SimpleClass();
$obj->invalid2 = "value2";
$this->assertEquals($obj->invalid2, "value2");
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
}
public function testArrayClassConversion()
diff --git a/tests/PayPal/Test/Common/NestedClass.php b/tests/PayPal/Test/Common/NestedClass.php
index ed9a0b4..01be928 100644
--- a/tests/PayPal/Test/Common/NestedClass.php
+++ b/tests/PayPal/Test/Common/NestedClass.php
@@ -1,9 +1,9 @@
info;
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/PPModelTest.php b/tests/PayPal/Test/Common/PayPalModelTest.php
similarity index 94%
rename from tests/PayPal/Test/Common/PPModelTest.php
rename to tests/PayPal/Test/Common/PayPalModelTest.php
index d31b1bc..ccb20f6 100644
--- a/tests/PayPal/Test/Common/PPModelTest.php
+++ b/tests/PayPal/Test/Common/PayPalModelTest.php
@@ -1,8 +1,8 @@
assertEquals($parent, $parentCopy);
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/SimpleClass.php b/tests/PayPal/Test/Common/SimpleClass.php
index debb0e8..4eb49ff 100644
--- a/tests/PayPal/Test/Common/SimpleClass.php
+++ b/tests/PayPal/Test/Common/SimpleClass.php
@@ -1,9 +1,9 @@
description;
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/UserAgentTest.php b/tests/PayPal/Test/Common/UserAgentTest.php
index 1823249..a9f6566 100644
--- a/tests/PayPal/Test/Common/UserAgentTest.php
+++ b/tests/PayPal/Test/Common/UserAgentTest.php
@@ -1,28 +1,28 @@
-assertNotNull($id);
- $this->assertNotNull($version);
- $this->assertNotNull($features);
-
- $this->assertEquals("name", $id);
- $this->assertEquals("version", $version);
-
- // Check that we pass in these mininal features
- $this->assertThat($features, $this->stringContains("OS="));
- $this->assertThat($features, $this->stringContains("Bit="));
- $this->assertThat($features, $this->stringContains("Lang="));
- $this->assertThat($features, $this->stringContains("V="));
- $this->assertGreaterThan(5, count(explode(';', $features)));
- }
-}
\ No newline at end of file
+assertNotNull($id);
+ $this->assertNotNull($version);
+ $this->assertNotNull($features);
+
+ $this->assertEquals("name", $id);
+ $this->assertEquals("version", $version);
+
+ // Check that we pass in these mininal features
+ $this->assertThat($features, $this->stringContains("OS="));
+ $this->assertThat($features, $this->stringContains("Bit="));
+ $this->assertThat($features, $this->stringContains("Lang="));
+ $this->assertThat($features, $this->stringContains("V="));
+ $this->assertGreaterThan(5, count(explode(';', $features)));
+ }
+}
diff --git a/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped b/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped
index fbada20..1f30eaf 100644
--- a/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped
+++ b/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped
@@ -1,10 +1,10 @@
object = new \ReflectionClass('PayPal\Core\PPConfigManager');
+ $this->object = new \ReflectionClass('PayPal\Core\PayPalConfigManager');
runkit_constant_remove('PP_CONFIG_PATH');
}
@@ -32,10 +32,10 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testGetInstance()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
$instance = $this->object->getInstance();
$instance2 = $this->object->getInstance();
- $this->assertTrue($instance instanceof PPConfigManager);
+ $this->assertTrue($instance instanceof PayPalConfigManager);
$this->assertSame($instance, $instance2);
}
@@ -43,7 +43,7 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testGet()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
$ret = $this->object->get('acct2');
$this->assertConfiguration(
array('acct2.ClientId' => 'TestClientId', 'acct2.ClientSecret' => 'TestClientSecret'),
@@ -57,7 +57,7 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testGetIniPrefix()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
$ret = $this->object->getIniPrefix();
$this->assertContains('acct1', $ret);
@@ -71,10 +71,10 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testConfigByDefault()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
// Test file based config params and defaults
- $config = PPConfigManager::getInstance()->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->getConfigHashmap();
$this->assertConfiguration(array('mode' => 'sandbox', 'http.ConnectionTimeOut' => '60'), $config);
}
@@ -82,25 +82,25 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testConfigByCustom()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
// Test custom config params and defaults
- $config = PPConfigManager::getInstance()->addConfigs(array('mode' => 'custom', 'http.ConnectionTimeOut' => 900))->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->addConfigs(array('mode' => 'custom', 'http.ConnectionTimeOut' => 900))->getConfigHashmap();
$this->assertConfiguration(array('mode' => 'custom', 'http.ConnectionTimeOut' => '900'), $config);
}
public function testConfigByFileAndCustom() {
define("PP_CONFIG_PATH", __DIR__. '/non_existent/');
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
- $config = PPConfigManager::getInstance()->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->getConfigHashmap();
$this->assertArrayHasKey('http.ConnectionTimeOut', $config);
$this->assertEquals('30', $config['http.ConnectionTimeOut']);
$this->assertEquals('5', $config['http.Retry']);
//Add more configs
- $config = PPConfigManager::getInstance()->addConfigs(array('http.Retry' => "10", 'mode' => 'sandbox'))->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->addConfigs(array('http.Retry' => "10", 'mode' => 'sandbox'))->getConfigHashmap();
$this->assertConfiguration(array('http.ConnectionTimeOut' => "30", 'http.Retry' => "10", 'mode' => 'sandbox'), $config);
}
diff --git a/tests/PayPal/Test/Core/PPCredentialManagerTest.php b/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php
similarity index 86%
rename from tests/PayPal/Test/Core/PPCredentialManagerTest.php
rename to tests/PayPal/Test/Core/PayPalCredentialManagerTest.php
index 4d32045..6c93cc1 100644
--- a/tests/PayPal/Test/Core/PPCredentialManagerTest.php
+++ b/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php
@@ -1,15 +1,15 @@
object = PPCredentialManager::getInstance($this->config);
+ $this->object = PayPalCredentialManager::getInstance($this->config);
}
/**
@@ -51,7 +51,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
public function testGetInstance()
{
$instance = $this->object->getInstance($this->config);
- $this->assertTrue($instance instanceof PPCredentialManager);
+ $this->assertTrue($instance instanceof PayPalCredentialManager);
}
/**
@@ -68,7 +68,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
/**
* @after testGetDefaultCredentialObject
*
- * @throws \PayPal\Exception\PPInvalidCredentialException
+ * @throws \PayPal\Exception\PayPalInvalidCredentialException
*/
public function testSetCredentialObject()
{
@@ -84,7 +84,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
/**
* @after testGetDefaultCredentialObject
*
- * @throws \PayPal\Exception\PPInvalidCredentialException
+ * @throws \PayPal\Exception\PayPalInvalidCredentialException
*/
public function testSetCredentialObjectWithUserId()
{
@@ -99,7 +99,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
/**
* @after testGetDefaultCredentialObject
*
- * @throws \PayPal\Exception\PPInvalidCredentialException
+ * @throws \PayPal\Exception\PayPalInvalidCredentialException
*/
public function testSetCredentialObjectWithoutDefault()
{
@@ -117,7 +117,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
*/
public function testGetInvalidCredentialObject()
{
- $this->setExpectedException('PayPal\Exception\PPInvalidCredentialException');
+ $this->setExpectedException('PayPal\Exception\PayPalInvalidCredentialException');
$cred = $this->object->getCredentialObject('invalid_biz_api1.gmail.com');
}
diff --git a/tests/PayPal/Test/Core/PPHttpConfigTest.php b/tests/PayPal/Test/Core/PayPalHttpConfigTest.php
similarity index 86%
rename from tests/PayPal/Test/Core/PPHttpConfigTest.php
rename to tests/PayPal/Test/Core/PayPalHttpConfigTest.php
index e55d160..44b0eeb 100644
--- a/tests/PayPal/Test/Core/PPHttpConfigTest.php
+++ b/tests/PayPal/Test/Core/PayPalHttpConfigTest.php
@@ -2,13 +2,13 @@
namespace PayPal\Test\Core;
-use PayPal\Core\PPHttpConfig;
+use PayPal\Core\PayPalHttpConfig;
/**
- * Test class for PPAPIService.
+ * Test class for PayPalHttpConfigTest.
*
*/
-class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
+class PayPalHttpConfigTest extends \PHPUnit_Framework_TestCase
{
protected $object;
@@ -40,7 +40,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
*/
public function testHeaderFunctions()
{
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->addHeader('key1', 'value1');
$o->addHeader('key2', 'value');
$o->addHeader('key2', 'overwritten');
@@ -49,7 +49,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('overwritten', $o->getHeader('key2'));
$this->assertNull($o->getHeader('key3'));
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->addHeader('key1', 'value1');
$o->addHeader('key2', 'value');
$o->addHeader('key2', 'and more', false);
@@ -67,7 +67,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
*/
public function testCurlOpts()
{
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setCurlOptions(array('k' => 'v'));
$curlOpts = $o->getCurlOptions();
@@ -77,7 +77,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
public function testRemoveCurlOpts()
{
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setCurlOptions(array('k' => 'v'));
$curlOpts = $o->getCurlOptions();
$this->assertEquals(1, count($curlOpts));
@@ -94,7 +94,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
public function testUserAgent()
{
$ua = 'UAString';
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setUserAgent($ua);
$curlOpts = $o->getCurlOptions();
@@ -109,7 +109,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
$sslCert = '../cacert.pem';
$sslPass = 'passPhrase';
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setSSLCert($sslCert, $sslPass);
$curlOpts = $o->getCurlOptions();
@@ -124,14 +124,14 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
{
$proxy = 'http://me:secret@hostname:8081';
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setHttpProxy($proxy);
$curlOpts = $o->getCurlOptions();
$this->assertEquals('hostname:8081', $curlOpts[CURLOPT_PROXY]);
$this->assertEquals('me:secret', $curlOpts[CURLOPT_PROXYUSERPWD]);
- $this->setExpectedException('PayPal\Exception\PPConfigurationException');
+ $this->setExpectedException('PayPal\Exception\PayPalConfigurationException');
$o->setHttpProxy('invalid string');
}
}
diff --git a/tests/PayPal/Test/Core/PPLoggingManagerTest.php b/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php
similarity index 78%
rename from tests/PayPal/Test/Core/PPLoggingManagerTest.php
rename to tests/PayPal/Test/Core/PayPalLoggingManagerTest.php
index 28b2084..e5a83db 100644
--- a/tests/PayPal/Test/Core/PPLoggingManagerTest.php
+++ b/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php
@@ -1,14 +1,14 @@
object = PPLoggingManager::getInstance('InvoiceTest');
+ $this->object = PayPalLoggingManager::getInstance('InvoiceTest');
}
/**
diff --git a/tests/PayPal/Test/Exception/PPConfigurationExceptionTest.php b/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php
similarity index 55%
rename from tests/PayPal/Test/Exception/PPConfigurationExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php
index 36bd2d2..c6067af 100644
--- a/tests/PayPal/Test/Exception/PPConfigurationExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPConfigurationException('Test PPConfigurationException');
+ $this->object = new PayPalConfigurationException('Test PayPalConfigurationException');
}
/**
@@ -31,7 +31,7 @@ class PPConfigurationExceptionTest extends \PHPUnit_Framework_TestCase
public function testPPConfigurationException()
{
- $this->assertEquals('Test PPConfigurationException', $this->object->getMessage());
+ $this->assertEquals('Test PayPalConfigurationException', $this->object->getMessage());
}
}
diff --git a/tests/PayPal/Test/Exception/PPConnectionExceptionTest.php b/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php
similarity index 73%
rename from tests/PayPal/Test/Exception/PPConnectionExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php
index 79b7264..f64470a 100644
--- a/tests/PayPal/Test/Exception/PPConnectionExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPConnectionException('http://testURL', 'test message');
+ $this->object = new PayPalConnectionException('http://testURL', 'test message');
$this->object->setData('response payload for connection');
}
diff --git a/tests/PayPal/Test/Exception/PPMissingCredentialExceptionTest.php b/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php
similarity index 67%
rename from tests/PayPal/Test/Exception/PPMissingCredentialExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php
index 2b352a0..93d51e1 100644
--- a/tests/PayPal/Test/Exception/PPMissingCredentialExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPMissingCredentialException;
+ $this->object = new PayPalInvalidCredentialException;
}
/**
diff --git a/tests/PayPal/Test/Exception/PPInvalidCredentialExceptionTest.php b/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php
similarity index 67%
rename from tests/PayPal/Test/Exception/PPInvalidCredentialExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php
index 9e45ed2..6892f20 100644
--- a/tests/PayPal/Test/Exception/PPInvalidCredentialExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPInvalidCredentialException;
+ $this->object = new PayPalMissingCredentialException;
}
/**
diff --git a/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php b/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php
index 15a1106..ca41177 100644
--- a/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php
@@ -8,12 +8,12 @@ use PayPal\Api\Currency;
use PayPal\Api\Patch;
use PayPal\Api\PatchRequest;
use PayPal\Api\Plan;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -28,7 +28,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -67,7 +67,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$agreement = new Agreement($request);
// Update the Schema to use a working Plan
$agreement->getPlan()->setId($plan->getId());
- $result = $agreement->create(null, $this->mockPPRestCall);
+ $result = $agreement->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -88,7 +88,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$paymentToken = $result['token'];
$this->assertNotNull($paymentToken);
$this->assertNotEmpty($paymentToken);
- $result = $agreement->execute($paymentToken, null, $this->mockPPRestCall);
+ $result = $agreement->execute($paymentToken, null, $this->mockPayPalRestCall);
return $result;
}
@@ -102,7 +102,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$agreement = new Agreement($request);
// Update the Schema to use a working Plan
$agreement->getPlan()->setId($plan->getId());
- $result = $agreement->create(null, $this->mockPPRestCall);
+ $result = $agreement->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -114,7 +114,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($agreement)
{
- $result = Agreement::get($agreement->getId(), null, $this->mockPPRestCall);
+ $result = Agreement::get($agreement->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($agreement->getId(), $result->getId());
return $result;
@@ -136,7 +136,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $agreement->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $agreement->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -149,7 +149,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$this->markTestSkipped('Skipped as the fix is on the way.');
$currency = new Currency($this->operation['request']['body']);
- $result = $agreement->setBalance($currency, null, $this->mockPPRestCall);
+ $result = $agreement->setBalance($currency, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
return $agreement;
}
@@ -163,7 +163,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$this->markTestSkipped('Skipped as the fix is on the way.');
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->billBalance($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->billBalance($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
return $agreement;
}
@@ -176,7 +176,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testGetTransactions($agreement)
{
$this->markTestSkipped('Skipped as the fix is on the way.');
- $result = Agreement::transactions($agreement->getId(), null, $this->mockPPRestCall);
+ $result = Agreement::transactions($agreement->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
@@ -188,7 +188,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testSuspend($agreement)
{
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->suspend($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->suspend($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->setupTest($this->getClassName(), 'testGetSuspended');
$get = $this->testGet($agreement);
$this->assertTrue($result);
@@ -204,7 +204,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testReactivate($agreement)
{
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->reActivate($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->reActivate($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
$this->setupTest($this->getClassName(), 'testGet');
$get = $this->testGet($agreement);
@@ -220,7 +220,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testCancel($agreement)
{
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->cancel($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->cancel($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
$this->setupTest($this->getClassName(), 'testGetCancelled');
$get = $this->testGet($agreement);
diff --git a/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php b/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php
index a3276f0..96af52f 100644
--- a/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php
@@ -6,13 +6,13 @@ use PayPal\Api\Patch;
use PayPal\Api\PatchRequest;
use PayPal\Api\Plan;
use PayPal\Auth\OAuthTokenCredential;
-use PayPal\Common\PPModel;
-use PayPal\Core\PPCredentialManager;
+use PayPal\Common\PayPalModel;
+use PayPal\Core\PayPalCredentialManager;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -31,7 +31,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
public $mode = 'mock';
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public $context;
@@ -86,7 +86,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Plan($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
self::$obj = $result;
return $result;
@@ -96,7 +96,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Plan($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -108,7 +108,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($plan)
{
- $result = Plan::get($plan->getId(), null, $this->mockPPRestCall);
+ $result = Plan::get($plan->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($plan->getId(), $result->getId());
$this->assertEquals($plan, $result, "", 0, 10, true);
@@ -121,7 +121,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($plan)
{
- $result = Plan::all(array('page_size' => '20', 'total_required' => 'yes'), null, $this->mockPPRestCall);
+ $result = Plan::all(array('page_size' => '20', 'total_required' => 'yes'), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$totalPages = $result->getTotalPages();
$found = false;
@@ -135,7 +135,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
}
}
if (!$found) {
- $result = Plan::all(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPPRestCall);
+ $result = Plan::all(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPayPalRestCall);
}
} while ($totalPages > 0 && $found == false);
@@ -160,7 +160,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $plan->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $plan->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -181,7 +181,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $plan->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $plan->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -202,8 +202,8 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $plan->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $plan->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
- return Plan::get($plan->getId(), null, $this->mockPPRestCall);
+ return Plan::get($plan->getId(), null, $this->mockPayPalRestCall);
}
}
diff --git a/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php b/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
index 05fd99d..546c822 100644
--- a/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
@@ -23,7 +23,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -58,7 +58,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Invoice($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
self::$obj = $result;
return $result;
@@ -71,7 +71,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($invoice)
{
- $result = Invoice::get($invoice->getId(), null, $this->mockPPRestCall);
+ $result = Invoice::get($invoice->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($invoice->getId(), $result->getId());
return $result;
@@ -84,7 +84,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testSend($invoice)
{
- $result = $invoice->send(null, $this->mockPPRestCall);
+ $result = $invoice->send(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $invoice;
}
@@ -97,7 +97,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
public function testUpdate($invoice)
{
$this->markTestSkipped('Skipped as the fix is on the way. #PPTIPS-1932');
- $result = $invoice->update(null, $this->mockPPRestCall);
+ $result = $invoice->update(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($invoice->getId(), $result->getId());
}
@@ -109,7 +109,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($invoice)
{
- $result = Invoice::getAll(array('page_size' => '20', 'total_count_required' => 'true'), null, $this->mockPPRestCall);
+ $result = Invoice::getAll(array('page_size' => '20', 'total_count_required' => 'true'), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertNotNull($result->getTotalCount());
$totalPages = ceil($result->getTotalCount()/20);
@@ -124,7 +124,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
}
}
if (!$found) {
- $result = Invoice::getAll(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPPRestCall);
+ $result = Invoice::getAll(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPayPalRestCall);
}
} while ($totalPages > 0 && $found == false);
@@ -141,7 +141,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$search = new Search($request);
- $result = Invoice::search($search, null, $this->mockPPRestCall);
+ $result = Invoice::search($search, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertNotNull($result->getTotalCount());
}
@@ -155,7 +155,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$notification = new Notification($request);
- $result = $invoice->remind($notification, null, $this->mockPPRestCall);
+ $result = $invoice->remind($notification, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
@@ -168,7 +168,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$notification = new CancelNotification($request);
- $result = $invoice->cancel($notification, null, $this->mockPPRestCall);
+ $result = $invoice->cancel($notification, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
@@ -179,7 +179,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testQRCode($invoice)
{
- $result = Invoice::qrCode($invoice->getId(), array(), null, $this->mockPPRestCall);
+ $result = Invoice::qrCode($invoice->getId(), array(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertNotNull($result->getImage());
}
@@ -198,7 +198,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
$this->setupTest($this->getClassName(), 'testRecordPayment');
$request = $this->operation['request']['body'];
$paymentDetail = new PaymentDetail($request);
- $result = $invoice->recordPayment($paymentDetail, null, $this->mockPPRestCall);
+ $result = $invoice->recordPayment($paymentDetail, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $invoice;
}
@@ -213,7 +213,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$refundDetail = new RefundDetail($request);
- $result = $invoice->recordRefund($refundDetail, null, $this->mockPPRestCall);
+ $result = $invoice->recordRefund($refundDetail, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->setupTest($this->getClassName(), 'testDelete');
$invoice = $this->testDelete($invoice);
@@ -230,7 +230,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
$this->setupTest($this->getClassName(), 'testCreate');
$invoice = $this->testCreate($invoice);
$this->setupTest($this->getClassName(), 'testDelete');
- $result = $invoice->delete(null, $this->mockPPRestCall);
+ $result = $invoice->delete(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php b/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php
index 09abb58..7889862 100644
--- a/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php
@@ -9,12 +9,12 @@ use PayPal\Api\Payment;
use PayPal\Api\PaymentExecution;
use PayPal\Api\Refund;
use PayPal\Api\Sale;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -29,7 +29,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -57,7 +57,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Payment($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -66,7 +66,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Payment($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -78,7 +78,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($payment)
{
- $result = Payment::get($payment->getId(), null, $this->mockPPRestCall);
+ $result = Payment::get($payment->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($payment->getId(), $result->getId());
$this->assertEquals($payment, $result, "", 0, 10, true);
@@ -96,7 +96,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
$transaction = $transactions[0];
$relatedResources = $transaction->getRelatedResources();
$resource = $relatedResources[0];
- $result = Sale::get($resource->getSale()->getId(), null, $this->mockPPRestCall);
+ $result = Sale::get($resource->getSale()->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($resource->getSale()->getId(), $result->getId());
return $result;
@@ -110,7 +110,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testRefundSale($sale)
{
$refund = new Refund($this->operation['request']['body']);
- $result = $sale->refund($refund, null, $this->mockPPRestCall);
+ $result = $sale->refund($refund, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals('completed', $result->getState());
$this->assertEquals($sale->getId(), $result->getSaleId());
diff --git a/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php b/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php
index c19ce5a..468bb21 100644
--- a/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php
@@ -3,12 +3,12 @@
namespace PayPal\Test\Functional\Api;
use PayPal\Api\Patch;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -23,7 +23,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -53,7 +53,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
$request = $this->operation['request']['body'];
$obj = new WebProfile($request);
$obj->setName(uniqid());
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -65,7 +65,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($createProfileResponse)
{
- $result = WebProfile::get($createProfileResponse->getId(), null, $this->mockPPRestCall);
+ $result = WebProfile::get($createProfileResponse->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($createProfileResponse->getId(), $result->getId());
$this->assertEquals($this->operation['response']['body']['presentation']['logo_image'], $result->getPresentation()->getLogoImage());
@@ -82,7 +82,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($webProfile)
{
- $result = WebProfile::get_list(null, $this->mockPPRestCall);
+ $result = WebProfile::get_list(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$found = false;
$foundObject = null;
@@ -110,7 +110,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
$boolValue = $webProfile->getInputFields()->getNoShipping();
$newValue = ($boolValue + 1) % 2;
$webProfile->getInputFields()->setNoShipping($newValue);
- $result = $webProfile->update(null, $this->mockPPRestCall);
+ $result = $webProfile->update(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($webProfile->getInputFields()->getNoShipping(), $newValue);
}
@@ -132,7 +132,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
"path": "/flow_config/landing_page_type"
}');
- $result = $webProfile->partial_update($patches, null, $this->mockPPRestCall);
+ $result = $webProfile->partial_update($patches, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -144,7 +144,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
{
$webProfile = new WebProfile();
$webProfile->setId($createProfileResponse->getId());
- $result = $webProfile->delete(null, $this->mockPPRestCall);
+ $result = $webProfile->delete(null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
diff --git a/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php b/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php
index 1f916e6..8006f5a 100644
--- a/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php
@@ -15,13 +15,13 @@ use PayPal\Api\WebhookEventList;
use PayPal\Api\WebhookEventType;
use PayPal\Api\WebhookEventTypeList;
use PayPal\Api\WebhookList;
-use PayPal\Common\PPModel;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Common\PayPalModel;
+use PayPal\Exception\PayPalConnectionException;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -36,7 +36,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -68,12 +68,12 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
$obj->setUrl($obj->getUrl() . '?rand=' . uniqid());
$result = null;
try {
- $result = $obj->create(null, $this->mockPPRestCall);
- } catch (PPConnectionException $ex) {
+ $result = $obj->create(null, $this->mockPayPalRestCall);
+ } catch (PayPalConnectionException $ex) {
$data = $ex->getData();
if (strpos($data,'WEBHOOK_NUMBER_LIMIT_EXCEEDED') !== false) {
$this->deleteAll();
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
} else {
$this->fail($ex->getMessage());
}
@@ -84,9 +84,9 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
public function deleteAll()
{
- $result = Webhook::getAll(null, $this->mockPPRestCall);
+ $result = Webhook::getAll(null, $this->mockPayPalRestCall);
foreach ($result->getWebhooks() as $webhookObject) {
- $webhookObject->delete(null, $this->mockPPRestCall);
+ $webhookObject->delete(null, $this->mockPayPalRestCall);
}
}
@@ -97,7 +97,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($webhook)
{
- $result = Webhook::get($webhook->getId(), null, $this->mockPPRestCall);
+ $result = Webhook::get($webhook->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($webhook->getId(), $result->getId());
$this->assertEquals($webhook, $result, "", 0, 10, true);
@@ -111,7 +111,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetSubscribedEventTypes($webhook)
{
- $result = WebhookEventType::subscribedEventTypes($webhook->getId(), null, $this->mockPPRestCall);
+ $result = WebhookEventType::subscribedEventTypes($webhook->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals(2, sizeof($result->getEventTypes()));
return $result;
@@ -124,7 +124,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($webhook)
{
- $result = Webhook::getAll(null, $this->mockPPRestCall);
+ $result = Webhook::getAll(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$found = false;
$foundObject = null;
@@ -162,7 +162,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $webhook->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $webhook->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$found = false;
$foundObject = null;
@@ -181,13 +181,13 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($webhook)
{
- $result = $webhook->delete(null, $this->mockPPRestCall);
+ $result = $webhook->delete(null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
public function testEventSearch()
{
- $result = WebhookEvent::all(array(),null, $this->mockPPRestCall);
+ $result = WebhookEvent::all(array(),null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
diff --git a/tests/PayPal/Test/Functional/Setup.php b/tests/PayPal/Test/Functional/Setup.php
index 1dd21ad..5743b18 100644
--- a/tests/PayPal/Test/Functional/Setup.php
+++ b/tests/PayPal/Test/Functional/Setup.php
@@ -3,7 +3,7 @@
namespace PayPal\Test\Functional;
use PayPal\Auth\OAuthTokenCredential;
-use PayPal\Core\PPCredentialManager;
+use PayPal\Core\PayPalCredentialManager;
use PayPal\Rest\ApiContext;
class Setup
@@ -24,7 +24,7 @@ class Setup
'log.LogLevel' => 'FINE',
'validation.level' => 'warning'
));
- PPCredentialManager::getInstance()->setCredentialObject(
+ PayPalCredentialManager::getInstance()->setCredentialObject(
new OAuthTokenCredential(
"AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS",
"EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL"
@@ -34,12 +34,12 @@ class Setup
self::$mode = getenv('REST_MODE') ? getenv('REST_MODE') : 'mock';
if (self::$mode != 'sandbox') {
- // Mock PPRest Caller if mode set to mock
- $test->mockPPRestCall = $test->getMockBuilder('\PayPal\Transport\PPRestCall')
+ // Mock PayPalRest Caller if mode set to mock
+ $test->mockPayPalRestCall = $test->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $test->mockPPRestCall->expects($test->any())
+ $test->mockPayPalRestCall->expects($test->any())
->method('execute')
->will($test->returnValue(
$test->response
diff --git a/tests/PayPal/Test/Rest/ApiContextTest.php b/tests/PayPal/Test/Rest/ApiContextTest.php
index 2b9148d..0fc1778 100644
--- a/tests/PayPal/Test/Rest/ApiContextTest.php
+++ b/tests/PayPal/Test/Rest/ApiContextTest.php
@@ -3,7 +3,7 @@
use PayPal\Rest\ApiContext;
/**
- * Test class for PPAPIService.
+ * Test class for ApiContextTest.
*
*/
class ApiContextTest extends PHPUnit_Framework_TestCase
diff --git a/tests/PayPal/Test/Validation/NumericValidatorTest.php b/tests/PayPal/Test/Validation/NumericValidatorTest.php
index 85cee40..46342cc 100644
--- a/tests/PayPal/Test/Validation/NumericValidatorTest.php
+++ b/tests/PayPal/Test/Validation/NumericValidatorTest.php
@@ -1,7 +1,7 @@
Obtain Access Token From Refresh Token