diff --git a/test/MustacheCallTest.php b/test/MustacheCallTest.php new file mode 100644 index 0000000..48cd079 --- /dev/null +++ b/test/MustacheCallTest.php @@ -0,0 +1,24 @@ +name = 'Bob'; + + $template = '{{# foo }}{{ label }}: {{ name }}{{/ foo }}'; + $data = array('label' => 'name', 'foo' => $foo); + $m = new Mustache($template, $data); + + $this->assertEquals('name: Bob', $m->render()); + } +} + +class Foo { + public $name; + public function __call($method, $args) { + return 'unknown value'; + } +}