diff --git a/tests/Model/Generated/Endpoint/PaymentTest.php b/tests/Model/Generated/Endpoint/PaymentTest.php index 097d5d5b..ddcf8c30 100644 --- a/tests/Model/Generated/Endpoint/PaymentTest.php +++ b/tests/Model/Generated/Endpoint/PaymentTest.php @@ -48,11 +48,13 @@ public function testSendMoneyToOtherUser() { $this->skipTestIfNeededDueToInsufficientBalance(); - Payment::create( + $response = Payment::create( new Amount(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), $this->getPointerUserBravo(), self::PAYMENT_DESCRIPTION ); + + static::assertNotNull($response); } /** @@ -60,7 +62,7 @@ public function testSendMoneyToOtherUser() * * This test has no assertion as of its testing to see if the code runs without errors. */ - public function testSendMoneyToOtherMonetaryAccount() + public function testSendMoneyToOtherMonetaryAccount(): BunqResponseInt { $this->skipTestIfNeededDueToInsufficientBalance(); @@ -68,7 +70,11 @@ public function testSendMoneyToOtherMonetaryAccount() new Amount(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), $this->getSecondMonetaryAccountAlias(), self::PAYMENT_DESCRIPTION - )->getValue(); + ); + + static::assertNotNull($paymentId); + + return $paymentId; } /** @@ -78,12 +84,14 @@ public function testSendMoneyToOtherMonetaryAccount() * * @depends testSendMoneyToOtherMonetaryAccount */ - public function testSendMessageToPayment() + public function testSendMessageToPayment(BunqResponseInt $paymentId) { $chatId = PaymentChat::create( - $this->paymentId + $paymentId->getValue() )->getValue(); - ChatMessageText::create($chatId, self::PAYMENT_CHAT_TEXT_MESSAGE); + $response = ChatMessageText::create($chatId, self::PAYMENT_CHAT_TEXT_MESSAGE); + + static::assertNotNull($response); } } diff --git a/tests/Model/Generated/Endpoint/RequestInquiryTest.php b/tests/Model/Generated/Endpoint/RequestInquiryTest.php index dda3438e..587a0e0d 100644 --- a/tests/Model/Generated/Endpoint/RequestInquiryTest.php +++ b/tests/Model/Generated/Endpoint/RequestInquiryTest.php @@ -45,6 +45,9 @@ public function testSendingAndAcceptingRequest() $this->sendRequest(); $responses = RequestResponse::listing($this->getSecondMonetaryAccountId())->getValue(); + + static::assertNotNull($responses); + $requestResponseId = $responses[self::INDEX_FIRST]->getId(); $this->acceptRequest($requestResponseId); } @@ -53,12 +56,14 @@ public function testSendingAndAcceptingRequest() */ private function sendRequest() { - RequestInquiry::create( + $response = RequestInquiry::create( new Amount(self::REQUEST_AMOUNT_IN_EUR, self::REQUEST_CURRENCY), $this->getSecondMonetaryAccountAlias(), self::REQUEST_DESCRIPTION, false ); + + static::assertNotNull($response); } /** @@ -66,11 +71,13 @@ private function sendRequest() */ private function acceptRequest(int $requestResponseId) { - RequestResponse::update( + $response = RequestResponse::update( $requestResponseId, $this->getSecondMonetaryAccountId(), null, self::REQUEST_STATUS_ACCEPTED ); + + static::assertNotNull($response); } }