diff --git a/test/MustacheTest.php b/test/MustacheTest.php index 06e1874..1936c4a 100644 --- a/test/MustacheTest.php +++ b/test/MustacheTest.php @@ -167,6 +167,25 @@ class MustacheTest extends PHPUnit_Framework_TestCase { $this->assertEquals($first, $second); } + /** + * testClone function. + * + * @dataProvider getExamples + * @access public + * @return void + */ + public function testClone($class, $template, $output) { + $m = new $class; + $n = clone $m; + + $n_output = $n->render($template); + + $o = clone $n; + + $this->assertEquals($m->render($template), $n_output); + $this->assertEquals($n_output, $o->render($template)); + } + /** * Test everything in the `examples` directory. *