forked from LiveCarta/PayPal-PHP-SDK
Fixed Failing Unit Tests
This commit is contained in:
@@ -91,18 +91,6 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
|
||||
return $invoice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSend
|
||||
* @param $invoice Invoice
|
||||
* @return Invoice
|
||||
*/
|
||||
public function testUpdate($invoice)
|
||||
{
|
||||
$result = $invoice->update($this->apiContext, $this->mockPayPalRestCall);
|
||||
$this->assertNotNull($result);
|
||||
$this->assertEquals($invoice->getId(), $result->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSend
|
||||
* @param $invoice Invoice
|
||||
@@ -133,6 +121,19 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($invoice->getId(), $foundObject->getId());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @depends testSend
|
||||
* @param $invoice Invoice
|
||||
* @return Invoice
|
||||
*/
|
||||
public function testUpdate($invoice)
|
||||
{
|
||||
$result = $invoice->update($this->apiContext, $this->mockPayPalRestCall);
|
||||
$this->assertNotNull($result);
|
||||
$this->assertEquals($invoice->getId(), $result->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSend
|
||||
* @param $invoice Invoice
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"openIdConnect": {}
|
||||
},
|
||||
"request": {
|
||||
"path": "v1/invoicing/invoices/INV2-EHNV-LJ5S-A7DZ-V6NJ/send",
|
||||
"path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7/send",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"openIdConnect": {}
|
||||
},
|
||||
"request": {
|
||||
"path": "v1/invoicing/invoices/INV2-8UZ6-Q3DK-VZXV-SXQB",
|
||||
"path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7",
|
||||
"method": "PUT",
|
||||
"headers": {
|
||||
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
|
||||
@@ -80,7 +80,7 @@
|
||||
"status": "",
|
||||
"headers": {},
|
||||
"body": {
|
||||
"id": "INV2-8UZ6-Q3DK-VZXV-SXQB",
|
||||
"id": "INV2-RF6D-L66T-D7H2-CRU7",
|
||||
"number": "0014",
|
||||
"status": "DRAFT",
|
||||
"merchant_info": {
|
||||
|
||||
Reference in New Issue
Block a user