diff --git a/packages/view/tests/FallthroughAttributesTest.php b/packages/view/tests/FallthroughAttributesTest.php new file mode 100644 index 000000000..546c47aa1 --- /dev/null +++ b/packages/view/tests/FallthroughAttributesTest.php @@ -0,0 +1,40 @@ +addViewComponents( + __DIR__ . '/Fixtures/x-fallthrough-test.view.php', + __DIR__ . '/Fixtures/x-fallthrough-dynamic-test.view.php', + ); + + $renderer = + TempestViewRenderer::make( + viewConfig: $viewConfig, + ); + + $html = $renderer->render( + view(__DIR__ . '/Fixtures/fallthrough.view.php'), + ); + + $this->assertEquals(<<<'HTML' +
+
+
+
+ HTML, $html); + } +} diff --git a/packages/view/tests/Fixtures/fallthrough.view.php b/packages/view/tests/Fixtures/fallthrough.view.php new file mode 100644 index 000000000..0eb074bcd --- /dev/null +++ b/packages/view/tests/Fixtures/fallthrough.view.php @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/packages/view/tests/Fixtures/x-fallthrough-dynamic-test.view.php b/packages/view/tests/Fixtures/x-fallthrough-dynamic-test.view.php new file mode 100644 index 000000000..d1a2d559a --- /dev/null +++ b/packages/view/tests/Fixtures/x-fallthrough-dynamic-test.view.php @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/packages/view/tests/Fixtures/x-fallthrough-test.view.php b/packages/view/tests/Fixtures/x-fallthrough-test.view.php new file mode 100644 index 000000000..85142b6f9 --- /dev/null +++ b/packages/view/tests/Fixtures/x-fallthrough-test.view.php @@ -0,0 +1 @@ +
\ No newline at end of file