Added test for template retention in subsequent render invocations.
This commit is contained in:
@@ -167,6 +167,23 @@ class MustacheTest extends PHPUnit_Framework_TestCase {
|
|||||||
$this->assertEquals($first, $second);
|
$this->assertEquals($first, $second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mustache should not use templates passed to the render() method for subsequent invocations.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testResetTemplateForMultipleInvocations() {
|
||||||
|
$m = new Mustache('Sirve.');
|
||||||
|
$m->render('No sirve.');
|
||||||
|
$this->assertEquals('Sirve.', $m->render());
|
||||||
|
|
||||||
|
$m2 = new Mustache();
|
||||||
|
$m2->render('No sirve.');
|
||||||
|
$this->assertEquals('', $m2->render());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test everything in the `examples` directory.
|
* Test everything in the `examples` directory.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user