From a9d8f04bc1428c6e7b113b59f7a940c69c33c89a Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Thu, 25 Jun 2026 11:01:57 +0200 Subject: [PATCH] fix: tests after rebasing --- .../Provider/PayumPayResponseProviderTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Sylius/Bundle/PayumBundle/tests/OrderPay/Provider/PayumPayResponseProviderTest.php b/src/Sylius/Bundle/PayumBundle/tests/OrderPay/Provider/PayumPayResponseProviderTest.php index 02aea06342..49fc4e5661 100644 --- a/src/Sylius/Bundle/PayumBundle/tests/OrderPay/Provider/PayumPayResponseProviderTest.php +++ b/src/Sylius/Bundle/PayumBundle/tests/OrderPay/Provider/PayumPayResponseProviderTest.php @@ -21,11 +21,11 @@ use PHPUnit\Framework\TestCase; use Sylius\Bundle\CoreBundle\OrderPay\Resolver\PaymentToPayResolverInterface; use Sylius\Bundle\PayumBundle\Model\GatewayConfig; use Sylius\Bundle\PayumBundle\OrderPay\Provider\PayumPayResponseProvider; -use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\PaymentInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; final class PayumPayResponseProviderTest extends TestCase { @@ -53,7 +53,7 @@ final class PayumPayResponseProviderTest extends TestCase public function testItCreatesCaptureTokenWithConfiguredAfterPayRouteAndParameters(): void { - $requestConfiguration = $this->createStub(RequestConfiguration::class); + $request = $this->createStub(Request::class); $order = $this->createOrder(); $payment = $this->createPaymentWithGatewayConfig(['use_authorize' => false]); $token = $this->createMock(TokenInterface::class); @@ -79,7 +79,7 @@ final class PayumPayResponseProviderTest extends TestCase $this->tokenFactory->expects(self::never())->method('createAuthorizeToken'); $token->expects(self::once())->method('getTargetUrl')->willReturn('/payum/capture'); - $response = $this->provider->getResponse($requestConfiguration, $order); + $response = $this->provider->getResponse($request, $order); self::assertInstanceOf(RedirectResponse::class, $response); self::assertSame('/payum/capture', $response->getTargetUrl()); @@ -87,7 +87,7 @@ final class PayumPayResponseProviderTest extends TestCase public function testItCreatesAuthorizeTokenWithConfiguredAfterPayRouteAndParameters(): void { - $requestConfiguration = $this->createStub(RequestConfiguration::class); + $request = $this->createStub(Request::class); $order = $this->createOrder(); $payment = $this->createPaymentWithGatewayConfig(['use_authorize' => true]); $token = $this->createMock(TokenInterface::class); @@ -113,7 +113,7 @@ final class PayumPayResponseProviderTest extends TestCase $this->tokenFactory->expects(self::never())->method('createCaptureToken'); $token->expects(self::once())->method('getTargetUrl')->willReturn('/payum/authorize'); - $response = $this->provider->getResponse($requestConfiguration, $order); + $response = $this->provider->getResponse($request, $order); self::assertInstanceOf(RedirectResponse::class, $response); self::assertSame('/payum/authorize', $response->getTargetUrl()); @@ -121,7 +121,7 @@ final class PayumPayResponseProviderTest extends TestCase public function testItSupportsOrdersWithPayumEnabledPayment(): void { - $requestConfiguration = $this->createStub(RequestConfiguration::class); + $request = $this->createStub(Request::class); $order = $this->createOrder(); $payment = $this->createPaymentWithGatewayConfig([]); @@ -132,12 +132,12 @@ final class PayumPayResponseProviderTest extends TestCase ->willReturn($payment) ; - self::assertTrue($this->provider->supports($requestConfiguration, $order)); + self::assertTrue($this->provider->supports($request, $order)); } public function testItDoesNotSupportOrdersWithPayumDisabledPayment(): void { - $requestConfiguration = $this->createStub(RequestConfiguration::class); + $request = $this->createStub(Request::class); $order = $this->createOrder(); $gatewayConfig = new GatewayConfig(); $gatewayConfig->setUsePayum(false); @@ -150,7 +150,7 @@ final class PayumPayResponseProviderTest extends TestCase ->willReturn($payment) ; - self::assertFalse($this->provider->supports($requestConfiguration, $order)); + self::assertFalse($this->provider->supports($request, $order)); } private function createOrder(): MockObject&OrderInterface