Forráskód Böngészése

ensure that text is ignored outside of a block inside of a parent tag

Dan Miller 11 éve
szülő
commit
56713e560f
1 módosított fájl, 9 hozzáadás és 2 törlés
  1. 9 2
      test/Mustache/Test/Functional/InheritanceTest.php

+ 9 - 2
test/Mustache/Test/Functional/InheritanceTest.php

@@ -47,8 +47,7 @@ class Mustache_Test_Functional_InheritanceTest extends PHPUnit_Framework_TestCas
                 array(
                     'foo' => '{{$baz}}default content{{/baz}}'
                 ),
-                array(
-                ),
+                array(),
                 '{{<foo}}{{=<% %>=}}<%={{ }}=%>{{/foo}}'
             )
         );
@@ -75,6 +74,14 @@ class Mustache_Test_Functional_InheritanceTest extends PHPUnit_Framework_TestCas
                 ),
                 '{{<foo}}{{! ignore me }}{{$baz}}set by template{{/baz}}{{/foo}}',
                 'set by template'
+            ),
+            array(
+                array(
+                    'foo' => '{{$baz}}defualt content{{/baz}}'
+                ),
+                array(),
+                '{{<foo}}set by template{{$baz}}also set by template{{/baz}}{{/foo}}',
+                'also set by template'
             )
         );
     }