Skip to content

[8.x] Fix checkout form test to properly resolve nested tags#1272

Merged
duncanmcclean merged 1 commit into
8.xfrom
fix/checkout-tag-test
May 25, 2026
Merged

[8.x] Fix checkout form test to properly resolve nested tags#1272
duncanmcclean merged 1 commit into
8.xfrom
fix/checkout-tag-test

Conversation

@duncanmcclean
Copy link
Copy Markdown
Owner

This pull request fixes an issue where the can output checkout form test was failing because nested Antlers tags weren't being resolved.

This was happening because the test was directly instantiating CheckoutTags and calling index() on it with content containing {{ sc:gateways }}. When tags are called directly like this (outside of Statamic's normal parsing pipeline), nested tags aren't resolved.

This PR fixes it by using the tag() helper function which properly parses Antlers templates through Statamic's Parse::template() method, ensuring all nested tags are resolved correctly.

The test was directly calling `$this->tag->index()` on a manually instantiated
CheckoutTags class, which doesn't resolve nested Antlers tags like `{{ sc:gateways }}`.

Updated the test to use the `tag()` helper function which properly parses
Antlers templates through Statamic's `Parse::template()` method.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@duncanmcclean duncanmcclean merged commit eb65c80 into 8.x May 25, 2026
15 checks passed
@duncanmcclean duncanmcclean deleted the fix/checkout-tag-test branch May 25, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant