Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Fixed Failing Unit Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Patel committed Aug 17, 2015
1 parent 88f0427 commit 9b4923d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
25 changes: 13 additions & 12 deletions tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,6 @@ public function testSend($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
* @param $invoice Invoice
Expand Down Expand Up @@ -133,6 +121,19 @@ public function testGetAll($invoice)
$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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\":[]}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\":[]}"
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 9b4923d

Please sign in to comment.