Jelajahi Sumber

Failing Test For Inheritance Indentation inside a replacement variable.

Mike Sherov 10 tahun lalu
induk
melakukan
067fd6c33e
1 mengubah file dengan 23 tambahan dan 0 penghapusan
  1. 23 0
      test/Mustache/Test/Functional/InheritanceTest.php

+ 23 - 0
test/Mustache/Test/Functional/InheritanceTest.php

@@ -286,6 +286,29 @@ class Mustache_Test_Functional_InheritanceTest extends PHPUnit_Framework_TestCas
         );
     }
 
+    public function testInheritSpacingWhenOverridingAPartial()
+    {
+        $partials = array(
+            'parent' => 'collaborate_and{{$id}}{{/id}}',
+            'child'  => '{{<parent}}{{$id}}_listen{{/id}}{{/parent}}',
+        );
+
+        $this->mustache->setPartials($partials);
+
+        $tpl = $this->mustache->loadTemplate(
+            'stop:
+              {{>child}}'
+        );
+
+        $data = array();
+
+        $this->assertEquals(
+            'stop:
+              collaborate_and_listen',
+            $tpl->render($data)
+        );
+    }
+
     public function testOverrideOneSubstitutionButNotTheOther()
     {
         $partials = array(