[limb-svn] r7131 - 3.x/trunk/limb/i18n/tests/cases/macro

svn at limb-project.com svn at limb-project.com
Fri Jul 25 12:05:35 MSD 2008


Author: serega
Date: 2008-07-25 12:05:35 +0400 (Fri, 25 Jul 2008)
New Revision: 7131
URL: http://fisheye.limb-project.com/changelog/limb/?cs=7131

Modified:
   3.x/trunk/limb/i18n/tests/cases/macro/lmbI18NClipMacroFilterTest.class.php
Log:
-- added a test for i18n_clip filter that checks if filter allows to use variables for filter params

Modified: 3.x/trunk/limb/i18n/tests/cases/macro/lmbI18NClipMacroFilterTest.class.php
===================================================================
--- 3.x/trunk/limb/i18n/tests/cases/macro/lmbI18NClipMacroFilterTest.class.php	2008-07-23 10:43:27 UTC (rev 7130)
+++ 3.x/trunk/limb/i18n/tests/cases/macro/lmbI18NClipMacroFilterTest.class.php	2008-07-25 08:05:35 UTC (rev 7131)
@@ -34,6 +34,18 @@
     $out = $tpl->render();
     $this->assertEqual($out, 'что');
   }
+  
+  
+  function testLengthLimitAsVariable()
+  {
+    $code = '{$#var|i18n_clip:$#limit}';
+    $tpl = $this->_createMacroTemplate($code, 'length_limit.html');
+    $var = "что-то";
+    $tpl->set('var', $var);
+    $tpl->set('limit', 3);
+    $out = $tpl->render();
+    $this->assertEqual($out, 'что');
+  }
 
   function testLengthLimitAndOffset()
   {



More information about the limb-svn mailing list