Fixed Failing Unit Tests

This commit is contained in:
Jay Patel
2015-08-17 14:29:29 -05:00
parent 88f04274eb
commit 9b4923da2d
3 changed files with 16 additions and 15 deletions

View File

@@ -91,18 +91,6 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
return $invoice; 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 * @depends testSend
* @param $invoice Invoice * @param $invoice Invoice
@@ -133,6 +121,19 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($invoice->getId(), $foundObject->getId()); $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 * @depends testSend
* @param $invoice Invoice * @param $invoice Invoice

View File

@@ -16,7 +16,7 @@
"openIdConnect": {} "openIdConnect": {}
}, },
"request": { "request": {
"path": "v1/invoicing/invoices/INV2-EHNV-LJ5S-A7DZ-V6NJ/send", "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7/send",
"method": "POST", "method": "POST",
"headers": { "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\":[]}" "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\":[]}"

View File

@@ -16,7 +16,7 @@
"openIdConnect": {} "openIdConnect": {}
}, },
"request": { "request": {
"path": "v1/invoicing/invoices/INV2-8UZ6-Q3DK-VZXV-SXQB", "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7",
"method": "PUT", "method": "PUT",
"headers": { "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\":[]}" "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": "", "status": "",
"headers": {}, "headers": {},
"body": { "body": {
"id": "INV2-8UZ6-Q3DK-VZXV-SXQB", "id": "INV2-RF6D-L66T-D7H2-CRU7",
"number": "0014", "number": "0014",
"status": "DRAFT", "status": "DRAFT",
"merchant_info": { "merchant_info": {