From db9702de4d3459fc47739e223c4ec512d10fba59 Mon Sep 17 00:00:00 2001 From: Timm Friebe Date: Sun, 22 Oct 2023 13:50:17 +0200 Subject: [PATCH] Add test for `{{.}}` inside sections --- .../php/com/handlebarsjs/unittest/ExecutionTest.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/php/com/handlebarsjs/unittest/ExecutionTest.class.php b/src/test/php/com/handlebarsjs/unittest/ExecutionTest.class.php index 8964d6d..dff09d0 100755 --- a/src/test/php/com/handlebarsjs/unittest/ExecutionTest.class.php +++ b/src/test/php/com/handlebarsjs/unittest/ExecutionTest.class.php @@ -58,6 +58,11 @@ public function this_has_no_special_meaning_in_path() { Assert::equals('Test', $this->evaluate('{{./this}}', ['this' => 'Test'])); } + #[Test] + public function iterator_inside_section() { + Assert::equals('User @test', $this->evaluate('{{#user}}User @{{.}}{{/user}}', ['user' => 'test'])); + } + #[Test] public function root_reference() { Assert::equals('Test', $this->evaluate('{{@root.name.en}}', ['name' => ['en' => 'Test']]));