From dde9c772476659772ff4730f3200f7a8cddb7ff9 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Wed, 10 Apr 2024 07:00:34 +1200 Subject: [PATCH] fix: require latest moneyphp --- composer.json | 1 + tests/PaymentGatewayControllerTest.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b052b66..22a4675 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "omnipay/paypal": "^3", "omnipay/dummy": "^3", "omnipay/paymentexpress": "^3.1.1", + "moneyphp/money": "^4.5", "symfony/http-foundation": "^5.4.25 || ^6.3.1" }, "autoload": { diff --git a/tests/PaymentGatewayControllerTest.php b/tests/PaymentGatewayControllerTest.php index 603ff58..c2b7b94 100644 --- a/tests/PaymentGatewayControllerTest.php +++ b/tests/PaymentGatewayControllerTest.php @@ -134,13 +134,17 @@ public function testInvalidStatus() public function testStaticRoute() { + Config::nest(); + $staticUrl = 'paymentendpoint/gateway/PaymentExpress_PxPay/complete?id=UNIQUEHASH23q5123tqasdf'; $response = $this->get($staticUrl); // should return 404, because static route isn't enabled $this->assertEquals($response->getStatusCode(), 404); // Configure gateway to use static route - Config::modify()->update(GatewayInfo::class, 'PaymentExpress_PxPay', ['use_static_route' => true]); + Config::modify()->set(GatewayInfo::class, 'PaymentExpress_PxPay', [ + 'use_static_route' => true + ]); $this->setMockHttpResponse( 'paymentexpress/tests/Mock/PxPayCompletePurchaseSuccess.txt'