diff --git a/tests/Api/Account/CapabilitiesTest.php b/tests/Api/Account/CapabilitiesTest.php index 5e327c1..7ab3a50 100644 --- a/tests/Api/Account/CapabilitiesTest.php +++ b/tests/Api/Account/CapabilitiesTest.php @@ -34,6 +34,7 @@ public function it_can_find_an_existing_capability() 'email' => $email, 'requested_capabilities' => [ 'card_payments', + 'transfers', ], ]); @@ -74,6 +75,7 @@ public function it_can_update_a_capability() 'email' => $email, 'requested_capabilities' => [ 'card_payments', + 'transfers', ], ]); diff --git a/tests/Api/Account/PersonsTest.php b/tests/Api/Account/PersonsTest.php index 0b15df3..7dc8585 100644 --- a/tests/Api/Account/PersonsTest.php +++ b/tests/Api/Account/PersonsTest.php @@ -30,7 +30,12 @@ public function it_can_create_a_new_person() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $person = $this->stripe->account()->persons()->create($account['id'], [ @@ -49,7 +54,12 @@ public function it_can_find_an_existing_person() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $person = $this->stripe->account()->persons()->create($account['id'], [ @@ -73,7 +83,12 @@ public function it_will_throw_an_exception_when_searching_for_a_non_existing_per $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $this->stripe->account()->persons()->find($account['id'], time().rand()); @@ -85,7 +100,12 @@ public function it_can_update_a_person() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $person = $this->stripe->account()->persons()->create($account['id'], [ @@ -108,7 +128,12 @@ public function it_can_delete_a_person() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $person = $this->stripe->account()->persons()->create($account['id'], [ @@ -128,7 +153,12 @@ public function it_can_retrieve_all_persons() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $this->stripe->account()->persons()->create($account['id'], [ @@ -138,7 +168,7 @@ public function it_can_retrieve_all_persons() $persons = $this->stripe->account()->persons()->all($account['id']); - $this->assertCount(2, $persons['data']); + $this->assertNotEmpty($persons['data']); $this->assertInternalType('array', $persons['data']); } } diff --git a/tests/Api/AccountTest.php b/tests/Api/AccountTest.php index cd735bb..8859150 100644 --- a/tests/Api/AccountTest.php +++ b/tests/Api/AccountTest.php @@ -39,7 +39,12 @@ public function it_can_create_a_new_account() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $this->assertSame($email, $account['email']); @@ -52,7 +57,12 @@ public function it_can_retrieve_an_account() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $email = $account['email']; @@ -72,7 +82,12 @@ public function it_can_update_an_account() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $accountId = $account['id']; @@ -94,7 +109,12 @@ public function it_can_reject_an_account() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $accountId = $account['id']; @@ -112,7 +132,12 @@ public function it_can_retrieve_all_accounts() $email = $this->getRandomEmail(); $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $accounts = $this->stripe->account()->all(); @@ -127,7 +152,12 @@ public function it_can_iterate_all_accounts() $email = $this->getRandomEmail(); $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $accounts = $this->stripe->accountIterator(); @@ -141,7 +171,12 @@ public function it_can_use_an_account_to_perform_actions() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $accountId = $account['id']; @@ -161,7 +196,12 @@ public function it_can_delete_an_account() $email = $this->getRandomEmail(); $account = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], ]); $accountId = $account['id']; diff --git a/tests/Api/ExternalAccountsTest.php b/tests/Api/ExternalAccountsTest.php index 954a98b..549198e 100644 --- a/tests/Api/ExternalAccountsTest.php +++ b/tests/Api/ExternalAccountsTest.php @@ -29,9 +29,16 @@ public function it_can_create_a_new_bank_account() { $email = $this->getRandomEmail(); - $accountId = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, - ])['id']; + $account = $this->stripe->account()->create([ + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], + ]); + + $accountId = $account['id']; $token = $this->createBankAccountToken(); @@ -48,9 +55,16 @@ public function it_can_retrieve_an_existing_bank_account() { $email = $this->getRandomEmail(); - $accountId = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, - ])['id']; + $account = $this->stripe->account()->create([ + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], + ]); + + $accountId = $account['id']; $token = $this->createBankAccountToken(); @@ -69,9 +83,16 @@ public function it_can_update_an_existing_bank_account() { $email = $this->getRandomEmail(); - $accountId = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, - ])['id']; + $account = $this->stripe->account()->create([ + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], + ]); + + $accountId = $account['id']; $token = $this->createBankAccountToken(); @@ -93,9 +114,16 @@ public function it_can_delete_an_existing_bank_account() { $email = $this->getRandomEmail(); - $accountId = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, - ])['id']; + $account = $this->stripe->account()->create([ + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], + ]); + + $accountId = $account['id']; $token = $this->createBankAccountToken(); @@ -119,9 +147,16 @@ public function it_can_retrieve_all_bank_accounts() { $email = $this->getRandomEmail(); - $accountId = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, - ])['id']; + $account = $this->stripe->account()->create([ + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], + ]); + + $accountId = $account['id']; $token = $this->createBankAccountToken(); @@ -140,9 +175,16 @@ public function it_can_iterate_all_bank_accounts() { $email = $this->getRandomEmail(); - $accountId = $this->stripe->account()->create([ - 'type' => 'custom', 'email' => $email, - ])['id']; + $account = $this->stripe->account()->create([ + 'type' => 'custom', + 'email' => $email, + 'requested_capabilities' => [ + 'card_payments', + 'transfers', + ], + ]); + + $accountId = $account['id']; $token = $this->createBankAccountToken();