Merge branch 'feature/test-coverage' into dev
This commit is contained in:
@@ -137,6 +137,36 @@ class MustacheTest extends PHPUnit_Framework_TestCase {
|
|||||||
$this->assertEquals('Zappa, Frank', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
|
$this->assertEquals('Zappa, Frank', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mustache should return the same thing when invoked multiple times.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testMultipleInvocations() {
|
||||||
|
$m = new Mustache('x');
|
||||||
|
$first = $m->render();
|
||||||
|
$second = $m->render();
|
||||||
|
|
||||||
|
$this->assertEquals('x', $first);
|
||||||
|
$this->assertEquals($first, $second);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mustache should return the same thing when invoked multiple times.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testMultipleInvocationsWithTags() {
|
||||||
|
$m = new Mustache('{{one}} {{two}}', array('one' => 'foo', 'two' => 'bar'));
|
||||||
|
$first = $m->render();
|
||||||
|
$second = $m->render();
|
||||||
|
|
||||||
|
$this->assertEquals('foo bar', $first);
|
||||||
|
$this->assertEquals($first, $second);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test everything in the `examples` directory.
|
* Test everything in the `examples` directory.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user