Skip to content

Commit

Permalink
add test for #46
Browse files Browse the repository at this point in the history
  • Loading branch information
Zordius Chen committed Jun 4, 2014
1 parent d6ad5aa commit a289a39
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/issue46.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
require('src/lightncandy.php');
$template = '{{{this.id}}}, {{a.id}}';
$php = LightnCandy::compile($template, Array(
'flags' => LightnCandy::FLAG_ERROR_LOG | 0 * LightnCandy::FLAG_STANDALONE | LightnCandy::FLAG_HANDLEBARSJS,
)
);

echo "Rendered PHP code is:\n$php\n\n";

$renderer = LightnCandy::prepare($php);

echo $renderer(Array('id' => 'bla bla bla'));

?>

0 comments on commit a289a39

Please sign in to comment.