summaryrefslogtreecommitdiff
path: root/vendor/zordius/lightncandy/tests/errorTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/zordius/lightncandy/tests/errorTest.php')
-rw-r--r--vendor/zordius/lightncandy/tests/errorTest.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/vendor/zordius/lightncandy/tests/errorTest.php b/vendor/zordius/lightncandy/tests/errorTest.php
index 30ecd97d..8c1cbbf1 100644
--- a/vendor/zordius/lightncandy/tests/errorTest.php
+++ b/vendor/zordius/lightncandy/tests/errorTest.php
@@ -197,7 +197,7 @@ class errorTest extends PHPUnit_Framework_TestCase
Array(
'template' => '{{testA[}}',
'options' => Array('flags' => LightnCandy::FLAG_ADVARNAME),
- 'expected' => 'Wrong variable naming as \'testA[\' in {{testA[}} !',
+ 'expected' => 'Wrong variable naming in {{testA[}}',
),
Array(
'template' => '{{[testB}}',
@@ -387,8 +387,27 @@ class errorTest extends PHPUnit_Framework_TestCase
'flags' => LightnCandy::FLAG_ADVARNAME,
'helpers' => Array('test_join'),
),
- 'expected' => "Custom helper 'foo' not found!",
+ 'expected' => "Can not find custom helper function defination foo() !",
),
+ Array(
+ 'template' => '{{1 + 2}}',
+ 'options' => Array(
+ 'flags' => LightnCandy::FLAG_HANDLEBARSJS,
+ 'helpers' => Array('test_join'),
+ ),
+ 'expected' => "Wrong variable naming as '+' in {{1 + 2}} ! You should wrap ! \" # % & ' * + , ; < = > { | } ~ into [ ]",
+ ),
+ Array(
+ 'template' => '{{> (foo) bar}}',
+ 'options' => Array(
+ 'flags' => LightnCandy::FLAG_HANDLEBARSJS,
+ 'basedir' => '.',
+ ),
+ 'expected' => Array(
+ "Can not find custom helper function defination foo() !",
+ "You use dynamic partial name as '(foo)', this only works with option FLAG_RUNTIMEPARTIAL enabled",
+ )
+ ),
);
return array_map(function($i) {