Skip to content

Commit

Permalink
Add tests for nested partial blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Sep 17, 2017
1 parent 1ef5167 commit 8d23ec6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public function non_existant_partial_renders_default() {
$this->assertEquals('My content', $this->evaluate('{{#> layout}}My content{{/layout}}', []));
}

#[@test]
public function nested_partial_block() {
$this->templates->add('layout', '{{#> inner}}Inner{{/inner}} {{> @partial-block }}');
$this->assertEquals('Inner Outer', $this->evaluate('{{#> layout}}Outer{{/layout}}', []));
}

#[@test]
public function layout() {
$this->templates->add('includes/hero', '<div class="hero"><img src="{{hero-src}}" alt="{{hero-alt}}"/></div>');
Expand Down

0 comments on commit 8d23ec6

Please sign in to comment.