Skip to content

Commit eb65c80

Browse files
[8.x] Fix checkout form test to properly resolve nested tags (#1272)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e64a2ca commit eb65c80

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

tests/Tags/CheckoutTagTest.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,18 @@
3838
test('can output checkout form', function () {
3939
fakeCartWithLineItem();
4040

41-
$this->tag->setParameters([]);
42-
43-
$this->tag->setContent('
44-
<h2>Checkout</h2>
45-
46-
{{ sc:gateways }}
47-
---
48-
{{ name }} - Duncan Cool ({{ config:is-duncan-cool }}) - Haggis - Tatties
49-
---
50-
{{ /sc:gateways }}
41+
$usage = (string) tag('
42+
{{ sc:checkout }}
43+
<h2>Checkout</h2>
44+
45+
{{ sc:gateways }}
46+
---
47+
{{ name }} - Duncan Cool ({{ config:is-duncan-cool }}) - Haggis - Tatties
48+
---
49+
{{ /sc:gateways }}
50+
{{ /sc:checkout }}
5151
');
5252

53-
$usage = $this->tag->index();
54-
5553
expect($usage)->toContain('Test On-site Gateway - Duncan Cool (yes) - Haggis - Tatties');
5654
expect($usage)->toContain('<form method="POST" action="http://localhost/!/simple-commerce/checkout"');
5755
});

0 commit comments

Comments
 (0)