[limb-svn] r7048 - in 3.x/trunk/limb/macro: src/tags/core tests/cases/tags/core

svn at limb-project.com svn at limb-project.com
Mon Jun 2 22:32:45 MSD 2008


Author: cmz
Date: 2008-06-02 22:32:45 +0400 (Mon, 02 Jun 2008)
New Revision: 7048
URL: http://fisheye.limb-project.com/changelog/limb/?cs=7048

Added:
   3.x/trunk/limb/macro/src/tags/core/comment.tag.php
   3.x/trunk/limb/macro/tests/cases/tags/core/lmbMacroCommentTagTest.class.php
Log:
-- added macro-tag {{comment}} (alias {{*}})

Added: 3.x/trunk/limb/macro/src/tags/core/comment.tag.php
===================================================================
--- 3.x/trunk/limb/macro/src/tags/core/comment.tag.php	                        (rev 0)
+++ 3.x/trunk/limb/macro/src/tags/core/comment.tag.php	2008-06-02 18:32:45 UTC (rev 7048)
@@ -0,0 +1,19 @@
+<?php
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright  Copyright &copy; 2004-2008 BIT(http://bit-creative.com)
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ */
+
+/**
+ * class lmbMacroCommentTag.
+ * @tag comment
+ * @aliases *
+ * @package macro
+ * @version $Id$
+ */
+class lmbMacroCommentTag extends lmbMacroPassiveTag
+{
+}


Property changes on: 3.x/trunk/limb/macro/src/tags/core/comment.tag.php
___________________________________________________________________
Name: svn:keywords
   + Id

Added: 3.x/trunk/limb/macro/tests/cases/tags/core/lmbMacroCommentTagTest.class.php
===================================================================
--- 3.x/trunk/limb/macro/tests/cases/tags/core/lmbMacroCommentTagTest.class.php	                        (rev 0)
+++ 3.x/trunk/limb/macro/tests/cases/tags/core/lmbMacroCommentTagTest.class.php	2008-06-02 18:32:45 UTC (rev 7048)
@@ -0,0 +1,31 @@
+<?php
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright  Copyright &copy; 2004-2008 BIT(http://bit-creative.com)
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ */
+
+class lmbMacroCommentTagTest extends lmbBaseMacroTest
+{
+  function testComment()
+  {
+    $template = "before{{comment}}comment{{/comment}}after";
+
+    $page = $this->_createMacroTemplate($template, 'tpl.html');
+    
+    $this->assertEqual($page->render(), "beforeafter"); 
+  }
+  
+  function testAliasComment()
+  {
+    $template = "before{{*}}comment{{/*}}after";
+
+    $page = $this->_createMacroTemplate($template, 'tpl.html');
+    
+    $this->assertEqual($page->render(), "beforeafter"); 
+  }
+  
+}
+?>
\ No newline at end of file



More information about the limb-svn mailing list