Skip to content

Commit

Permalink
Renamed some methods and vars. (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Apr 3, 2018
1 parent cef556b commit 46c568c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions tests/BunqSdkTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

/**
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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());

Expand All @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Http/PaginationScenarioTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions tests/Model/Generated/Endpoint/PaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion tests/Model/Generated/Endpoint/RequestInquiryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RequestInquiryTest extends BunqSdkTestBase
*/
public function testSendingAndAcceptingRequest()
{
$this->assertTestShouldBeSkippedDueToInsufficientBalance();
$this->skipTestIfNeededDueToInsufficientBalance();

$this->sendRequest();
$responses = RequestResponse::listing($this->getSecondMonetaryAccountId())->getValue();
Expand Down

0 comments on commit 46c568c

Please sign in to comment.