Skip to content

Commit c38504d

Browse files
committed
Add test for underscore prefixed variables
1 parent 6a54bb0 commit c38504d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/dotHelper.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,19 @@ public function testMagicMethod()
140140
$this->assertSame('bar', $dotHelper($object, 'foo'));
141141
$this->assertSame('biz', call_user_func($dotHelper($object, 'bar')));
142142
$this->assertSame(null, call_user_func($dotHelper($object, 'biz')));
143+
144+
$jsPhpize = new JsPhpize(array(
145+
'returnLastStatement' => true,
146+
));
147+
$hello = $jsPhpize->render('__page.seo.title', array(
148+
'__page' => array(
149+
'seo' => array(
150+
'title' => 'Hello',
151+
),
152+
),
153+
));
154+
155+
$this->assertSame('Hello', $hello);
143156
}
144157

145158
public function testArrayAccess()

0 commit comments

Comments
 (0)