From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- vendor/zordius/lightncandy/tests/errorTest.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'vendor/zordius/lightncandy/tests/errorTest.php') 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) { -- cgit v1.2.3-54-g00ecf