We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea501f5 commit 1c4ffcbCopy full SHA for 1c4ffcb
tests/View/Antlers/ViewTest.php
@@ -40,6 +40,20 @@ function combines_two_views()
40
});
41
}
42
43
+ /** @test */
44
+ function a_layout_can_be_in_the_layouts_directory()
45
+ {
46
+ $this->viewShouldReturnRaw('template', file_get_contents(__DIR__.'/fixtures/template.antlers.html'));
47
+ $this->viewShouldReturnRaw('layouts.test', file_get_contents(__DIR__.'/fixtures/layout.antlers.html'));
48
+
49
+ $view = (new View)
50
+ ->template('template')
51
+ ->layout('test')
52
+ ->with(['foo' => 'bar']);
53
54
+ $this->assertEquals('Layout: bar | Template: bar', $view->render());
55
+ }
56
57
/** @test */
58
function template_is_rendered_alone_if_no_layout_is_provided()
59
{
0 commit comments