diff --git a/test/functional/BitPaySDK/PayoutRecipientsClientTest.php b/test/functional/BitPaySDK/PayoutRecipientsClientTest.php index d0f2351e..b72480f1 100644 --- a/test/functional/BitPaySDK/PayoutRecipientsClientTest.php +++ b/test/functional/BitPaySDK/PayoutRecipientsClientTest.php @@ -59,7 +59,7 @@ public function testGetPayoutRecipient() self::assertEquals('test@emaill1.com', $recipient->getEmail()); self::assertEquals('recipient1', $recipient->getLabel()); self::assertEquals('invited', $recipient->getStatus()); - self::assertEquals(null, $recipient->getShopperId()); + self::assertNull($recipient->getShopperId()); } public function testPayoutRecipientShouldCatchRestCliException(): void @@ -117,7 +117,7 @@ public function testDeletePayoutRecipient(): void $result = $this->client->deletePayoutRecipient($payoutRecipientId); - self::assertEquals(true, $result); + self::assertTrue($result); } public function testPayoutRecipientRequestNotification(): void @@ -135,6 +135,6 @@ public function testPayoutRecipientRequestNotification(): void $result = $this->client->requestPayoutRecipientNotification($payoutRecipientId); - self::assertEquals(true, $result); + self::assertTrue($result); } -} \ No newline at end of file +} diff --git a/test/unit/BitPaySDK/ClientTest.php b/test/unit/BitPaySDK/ClientTest.php index a0623f98..f7f2efac 100644 --- a/test/unit/BitPaySDK/ClientTest.php +++ b/test/unit/BitPaySDK/ClientTest.php @@ -3095,7 +3095,7 @@ public function testCancelInvoice() $result = $testedObject->cancelInvoice(self::TEST_INVOICE_ID, $params['forceCancel']); self::assertEquals(self::TEST_INVOICE_ID, $result->getId()); - self::assertEquals(true, $result->getIsCancelled()); + self::assertTrue($result->getIsCancelled()); } /** @@ -3149,7 +3149,7 @@ public function testCancelInvoiceByGuid() $result = $testedObject->cancelInvoiceByGuid(self::TEST_INVOICE_GUID, $params['forceCancel']); self::assertEquals(self::TEST_INVOICE_GUID, $result->getGuid()); self::assertEquals(self::TEST_INVOICE_ID, $result->getId()); - self::assertEquals(true, $result->getIsCancelled()); + self::assertTrue($result->getIsCancelled()); } /** diff --git a/test/unit/BitPaySDK/Exceptions/BitPayExceptionTest.php b/test/unit/BitPaySDK/Exceptions/BitPayExceptionTest.php index 8dcd0944..685bad79 100644 --- a/test/unit/BitPaySDK/Exceptions/BitPayExceptionTest.php +++ b/test/unit/BitPaySDK/Exceptions/BitPayExceptionTest.php @@ -21,7 +21,7 @@ public function testDefaultApiCode() { $exception = $this->createClassObject(); - self::assertEquals(null, $exception->getApiCode()); + self::assertNull($exception->getApiCode()); } public function testDefaultCode() @@ -57,4 +57,4 @@ private function createClassObject() { return new BitPayException(); } -} \ No newline at end of file +} diff --git a/test/unit/BitPaySDK/Model/Bill/BillTest.php b/test/unit/BitPaySDK/Model/Bill/BillTest.php index f524a397..20e890ac 100644 --- a/test/unit/BitPaySDK/Model/Bill/BillTest.php +++ b/test/unit/BitPaySDK/Model/Bill/BillTest.php @@ -259,7 +259,7 @@ public function testToArray() self::assertEquals([''], $billArray['cc']); self::assertEquals('123456789', $billArray['phone']); self::assertEquals('2022-01-01', $billArray['dueDate']); - self::assertEquals(true, $billArray['passProcessingFee']); + self::assertTrue($billArray['passProcessingFee']); self::assertEquals('status', $billArray['status']); self::assertEquals('http://test.com', $billArray['url']); self::assertEquals('2022-01-01', $billArray['createDate']); diff --git a/test/unit/BitPaySDK/Model/CurrencyTest.php b/test/unit/BitPaySDK/Model/CurrencyTest.php index 6f7da423..c29fd66b 100644 --- a/test/unit/BitPaySDK/Model/CurrencyTest.php +++ b/test/unit/BitPaySDK/Model/CurrencyTest.php @@ -53,12 +53,12 @@ public function testToArray() self::assertEquals('BTC', $currencyArray['code']); self::assertEquals('Symbol', $currencyArray['symbol']); self::assertEquals(1, $currencyArray['precision']); - self::assertEquals(true, $currencyArray['currentlySettled']); + self::assertTrue($currencyArray['currentlySettled']); self::assertEquals('Bitcoin', $currencyArray['name']); self::assertEquals('plural', $currencyArray['plural']); self::assertEquals('alts', $currencyArray['alts']); self::assertEquals('minimum', $currencyArray['minimum']); - self::assertEquals(true, $currencyArray['sanctioned']); + self::assertTrue($currencyArray['sanctioned']); self::assertEquals('decimals', $currencyArray['decimals']); self::assertEquals(['test'], $currencyArray['payoutFields']); self::assertEquals(['test'], $currencyArray['settlementMinimum']); @@ -89,7 +89,7 @@ public function testGetCurrentlySettled() { $currency = $this->createClassObject(); $currency->setCurrentlySettled(true); - self::assertEquals(true, $currency->getCurrentlySettled()); + self::assertTrue($currency->getCurrentlySettled()); } public function testGetName() @@ -124,7 +124,7 @@ public function testGetSanctioned() { $currency = $this->createClassObject(); $currency->setSanctioned(true); - self::assertEquals(true, $currency->getSanctioned()); + self::assertTrue($currency->getSanctioned()); } public function testGetDecimals() diff --git a/test/unit/BitPaySDK/Model/Invoice/BuyerProvidedInfoTest.php b/test/unit/BitPaySDK/Model/Invoice/BuyerProvidedInfoTest.php index 605079d1..e319047c 100644 --- a/test/unit/BitPaySDK/Model/Invoice/BuyerProvidedInfoTest.php +++ b/test/unit/BitPaySDK/Model/Invoice/BuyerProvidedInfoTest.php @@ -113,7 +113,7 @@ public function testToArray() self::assertEquals('example@bitpay.com', $buyerProvidedInfoArray['emailAddress']); self::assertEquals('BTC', $buyerProvidedInfoArray['selectedTransactionCurrency']); self::assertEquals('4445556666', $buyerProvidedInfoArray['sms']); - self::assertEquals(true, $buyerProvidedInfoArray['smsVerified']); + self::assertTrue($buyerProvidedInfoArray['smsVerified']); } public function testToArrayEmptyKey() diff --git a/test/unit/BitPaySDK/Model/Invoice/ItemizedDetailsTest.php b/test/unit/BitPaySDK/Model/Invoice/ItemizedDetailsTest.php index e2be088c..d83c99c4 100644 --- a/test/unit/BitPaySDK/Model/Invoice/ItemizedDetailsTest.php +++ b/test/unit/BitPaySDK/Model/Invoice/ItemizedDetailsTest.php @@ -53,7 +53,7 @@ public function testToArray() self::assertEquals(15.5, $itemizedDetailsArray['amount']); self::assertEquals('Test description', $itemizedDetailsArray['description']); - self::assertEquals(true, $itemizedDetailsArray['isFee']); + self::assertTrue($itemizedDetailsArray['isFee']); } private function createClassObject(): ItemizedDetails diff --git a/test/unit/BitPaySDK/Model/Invoice/RefundTest.php b/test/unit/BitPaySDK/Model/Invoice/RefundTest.php index 9914a145..62a5b284 100644 --- a/test/unit/BitPaySDK/Model/Invoice/RefundTest.php +++ b/test/unit/BitPaySDK/Model/Invoice/RefundTest.php @@ -175,11 +175,11 @@ public function testToArray() self::assertEquals('2022-01-01', $refundArray['requestDate']); self::assertEquals('pending', $refundArray['status']); self::assertEquals('11', $refundArray['invoiceId']); - self::assertEquals(true, $refundArray['preview']); - self::assertEquals(true, $refundArray['immediate']); + self::assertTrue($refundArray['preview']); + self::assertTrue($refundArray['immediate']); self::assertEquals(1.0, $refundArray['refundFee']); self::assertEquals('Invoice', $refundArray['invoice']); - self::assertEquals(true, $refundArray['buyerPaysRefundFee']); + self::assertTrue($refundArray['buyerPaysRefundFee']); self::assertEquals('Reference', $refundArray['reference']); self::assertEquals('Last refunded notification', $refundArray['lastRefundNotification']); } diff --git a/test/unit/BitPaySDK/Model/Invoice/RefundWebhookTest.php b/test/unit/BitPaySDK/Model/Invoice/RefundWebhookTest.php index 81ddbc74..213f949a 100644 --- a/test/unit/BitPaySDK/Model/Invoice/RefundWebhookTest.php +++ b/test/unit/BitPaySDK/Model/Invoice/RefundWebhookTest.php @@ -138,8 +138,8 @@ public function testToArray() self::assertEquals('USD', $refundWebhookArray['currency']); self::assertEquals('2022-01-11T16:58:23.967Z', $refundWebhookArray['lastRefundNotification']); self::assertEquals(2.31, $refundWebhookArray['refundFee']); - self::assertEquals(false, $refundWebhookArray['immediate']); - self::assertEquals(true, $refundWebhookArray['buyerPaysRefundFee']); + self::assertFalse($refundWebhookArray['immediate']); + self::assertTrue($refundWebhookArray['buyerPaysRefundFee']); self::assertEquals('2022-01-11T16:58:23.000Z', $refundWebhookArray['requestDate']); } @@ -162,4 +162,4 @@ private function objectSetters(RefundWebhook $refundWebhook): void $refundWebhook->setBuyerPaysRefundFee(true); $refundWebhook->setRequestDate('2022-01-11T16:58:23.000Z'); } -} \ No newline at end of file +} diff --git a/test/unit/BitPaySDK/Model/Invoice/SupportedTransactionCurrencyTest.php b/test/unit/BitPaySDK/Model/Invoice/SupportedTransactionCurrencyTest.php index 70d93953..38e1016e 100644 --- a/test/unit/BitPaySDK/Model/Invoice/SupportedTransactionCurrencyTest.php +++ b/test/unit/BitPaySDK/Model/Invoice/SupportedTransactionCurrencyTest.php @@ -42,7 +42,7 @@ public function testToArray() self::assertArrayHasKey('enabled', $supportedTransactionCurrencyArray); self::assertArrayHasKey('reason', $supportedTransactionCurrencyArray); - self::assertEquals(true, $supportedTransactionCurrencyArray['enabled']); + self::assertTrue($supportedTransactionCurrencyArray['enabled']); self::assertEquals("My reason", $supportedTransactionCurrencyArray['reason']); } diff --git a/test/unit/BitPaySDK/Model/Wallet/CurrenciesTest.php b/test/unit/BitPaySDK/Model/Wallet/CurrenciesTest.php index 1503b8cb..6803a609 100644 --- a/test/unit/BitPaySDK/Model/Wallet/CurrenciesTest.php +++ b/test/unit/BitPaySDK/Model/Wallet/CurrenciesTest.php @@ -100,14 +100,14 @@ public function testToArray() self::assertArrayHasKey('walletConnect', $currenciesArray); self::assertEquals('BTH', $currenciesArray['code']); - self::assertEquals(true, $currenciesArray['p2p']); - self::assertEquals(true, $currenciesArray['dappBrowser']); + self::assertTrue($currenciesArray['p2p']); + self::assertTrue($currenciesArray['dappBrowser']); self::assertEquals('https://bitpay.com/api/images/logo-6fa5404d.svg', $currenciesArray['image']); - self::assertEquals(true, $currenciesArray['paypro']); + self::assertTrue($currenciesArray['paypro']); self::assertEquals('BIP21', $currenciesArray['qr']['type']); - self::assertEquals(false, $currenciesArray['qr']['collapsed']); + self::assertFalse($currenciesArray['qr']['collapsed']); self::assertEquals('1.23', $currenciesArray['withdrawalFee']); - self::assertEquals(true, $currenciesArray['walletConnect']); + self::assertTrue($currenciesArray['walletConnect']); } private function createClassObject(): Currencies @@ -130,4 +130,4 @@ private function objectSetters(Currencies $currencies): void $currencies->setWithdrawalFee('1.23'); $currencies->setWalletConnect(true); } -} \ No newline at end of file +} diff --git a/test/unit/BitPaySDK/Model/Wallet/CurrencyQrTest.php b/test/unit/BitPaySDK/Model/Wallet/CurrencyQrTest.php index 9d62b402..86b1b7e8 100644 --- a/test/unit/BitPaySDK/Model/Wallet/CurrencyQrTest.php +++ b/test/unit/BitPaySDK/Model/Wallet/CurrencyQrTest.php @@ -42,7 +42,7 @@ public function testToArray() self::assertArrayHasKey('collapsed', $currencyQrArray); self::assertEquals('BIP21', $currencyQrArray['type']); - self::assertEquals(false, $currencyQrArray['collapsed']); + self::assertFalse($currencyQrArray['collapsed']); } private function createClassObject(): CurrencyQr @@ -55,4 +55,4 @@ private function objectSetters(CurrencyQr $currencyQr): void $currencyQr->setType('BIP21'); $currencyQr->setCollapsed(false); } -} \ No newline at end of file +}