1

If I crate the class for test like:

class ReturnHandlerTest extends OrderKernelTestBase {

  protected static $modules = [
    'commerce_payment',
    'commerce_payment_example',
  ];

  protected function setUp(): void {
    parent::setUp();
  }

}

And if I want to use

 Url::fromRoute('commerce_payment.checkout.return', $arguments)
   ->setOptions(['absolute' => true])
   ->toString()

In the test, I get this exception.

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "commerce_payment.checkout.return" does not exist.

What should I do?

1 Answer 1

1

I should include the module "commerce_checkout".

 protected static $modules = [
    'commerce_payment',
    'commerce_payment_example',
    'commerce_checkout',
  ];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.