From 46c568ca750c6552e7ece12c5ddcd49252126636 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Tue, 3 Apr 2018 09:36:44 +0200 Subject: [PATCH] Renamed some methods and vars. (bunq/sdk_php#120) --- tests/BunqSdkTestBase.php | 12 ++++++------ tests/Http/PaginationScenarioTest.php | 2 +- tests/Model/Generated/Endpoint/PaymentTest.php | 6 +++--- .../Model/Generated/Endpoint/RequestInquiryTest.php | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/BunqSdkTestBase.php b/tests/BunqSdkTestBase.php index a348c189..de0758c8 100644 --- a/tests/BunqSdkTestBase.php +++ b/tests/BunqSdkTestBase.php @@ -114,13 +114,13 @@ private function setCashRegister() ] ); $avatarUuid = Avatar::create($attachmentUuid->getValue()); - $cashId = CashRegister::create( + $cashRegisterId = CashRegister::create( self::CASH_REGISTER_NAME, self::CASH_REGISTER_STATUS, $avatarUuid->getValue() ); - $this->cashRegister = CashRegister::get($cashId->getValue()); + $this->cashRegister = CashRegister::get($cashRegisterId->getValue()); } /** @@ -196,7 +196,7 @@ protected function getUserAlias(): Pointer /** * @return Pointer */ - protected function getUserBravoPointer(): Pointer + protected function getPointerUserBravo(): Pointer { return new Pointer( self::POINTER_TYPE_EMAIL, @@ -227,7 +227,7 @@ protected function getCashRegisterId(): int /** * @return bool */ - protected function doesAccountHaveEnoughMoney(): bool + protected function isMonetaryAccountBalanceSufficient(): bool { $balance = floatval(BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getBalance()->getValue()); @@ -237,9 +237,9 @@ protected function doesAccountHaveEnoughMoney(): bool /** * @return bool */ - protected function assertTestShouldBeSkippedDueToInsufficientBalance(): bool + protected function skipTestIfNeededDueToInsufficientBalance(): bool { - if (!$this->doesAccountHaveEnoughMoney()) { + if (!$this->isMonetaryAccountBalanceSufficient()) { static::markTestSkipped(self::WARMING_TEST_SKIPPED_DUE_TO_INSUFFICIENT_BALANCE); } diff --git a/tests/Http/PaginationScenarioTest.php b/tests/Http/PaginationScenarioTest.php index f4a5644d..ea3d7c33 100644 --- a/tests/Http/PaginationScenarioTest.php +++ b/tests/Http/PaginationScenarioTest.php @@ -51,7 +51,7 @@ public function testApiScenarioPaymentListingWithPagination() */ private function ensureEnoughPayments() { - $this->assertTestShouldBeSkippedDueToInsufficientBalance(); + $this->skipTestIfNeededDueToInsufficientBalance(); for ($i = self::NUMBER_ZERO; $i < self::getPaymentsMissingCount(); ++$i) { $this->createPayment(); diff --git a/tests/Model/Generated/Endpoint/PaymentTest.php b/tests/Model/Generated/Endpoint/PaymentTest.php index 99394f85..2d7a6255 100644 --- a/tests/Model/Generated/Endpoint/PaymentTest.php +++ b/tests/Model/Generated/Endpoint/PaymentTest.php @@ -50,11 +50,11 @@ class PaymentTest extends BunqSdkTestBase */ public function testSendMoneyToOtherUser() { - $this->assertTestShouldBeSkippedDueToInsufficientBalance(); + $this->skipTestIfNeededDueToInsufficientBalance(); Payment::create( new Amount(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), - $this->getUserBravoPointer(), + $this->getPointerUserBravo(), self::PAYMENT_DESCRIPTION ); } @@ -66,7 +66,7 @@ public function testSendMoneyToOtherUser() */ public function testSendMoneyToOtherMonetaryAccount() { - $this->assertTestShouldBeSkippedDueToInsufficientBalance(); + $this->skipTestIfNeededDueToInsufficientBalance(); $this->paymentId = Payment::create( new Amount(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), diff --git a/tests/Model/Generated/Endpoint/RequestInquiryTest.php b/tests/Model/Generated/Endpoint/RequestInquiryTest.php index 88a1f7fc..dda3438e 100644 --- a/tests/Model/Generated/Endpoint/RequestInquiryTest.php +++ b/tests/Model/Generated/Endpoint/RequestInquiryTest.php @@ -41,7 +41,7 @@ class RequestInquiryTest extends BunqSdkTestBase */ public function testSendingAndAcceptingRequest() { - $this->assertTestShouldBeSkippedDueToInsufficientBalance(); + $this->skipTestIfNeededDueToInsufficientBalance(); $this->sendRequest(); $responses = RequestResponse::listing($this->getSecondMonetaryAccountId())->getValue();