diff --git a/tests/Tags/Form/FormCreateTest.php b/tests/Tags/Form/FormCreateTest.php index bdebae821a..cbbd668037 100644 --- a/tests/Tags/Form/FormCreateTest.php +++ b/tests/Tags/Form/FormCreateTest.php @@ -5,6 +5,8 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; +use Illuminate\Testing\Assert as PHPUnit; +use Illuminate\Testing\Constraints\SeeInOrder; use Illuminate\Validation\ValidationException; use PHPUnit\Framework\Attributes\Test; use Statamic\Facades\AssetContainer; @@ -75,6 +77,26 @@ public function it_dynamically_renders_fields_array() $this->assertEquals(['Full Name', 'Email Address', 'Message'], $fieldOrder[1]); } + #[Test] + public function it_dynamically_renders_fields_view_using_single_tag() + { + $output = $this->normalizeHtml($this->tag(<<<'EOT' +{{ form:contact }} + {{ fields }} +{{ /form:contact }} +EOT + )); + + PHPUnit::assertThat([ + '', + '', + '', + '', + '', + '', + ], new SeeInOrder($output)); + } + #[Test] public function it_dynamically_renders_with_form_handle() {