Rename Mustache_Mustache to Mustache_Engine.
Because the former was just too absurd to keep typing.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
class Mustache_Test_EngineTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
private static $tempDir;
|
||||
|
||||
@@ -26,7 +26,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
public function testConstructor() {
|
||||
$loader = new Mustache_Loader_StringLoader;
|
||||
$partialsLoader = new Mustache_Loader_ArrayLoader;
|
||||
$mustache = new Mustache_Mustache(array(
|
||||
$mustache = new Mustache_Engine(array(
|
||||
'template_class_prefix' => '__whot__',
|
||||
'cache' => self::$tempDir,
|
||||
'loader' => $loader,
|
||||
@@ -83,7 +83,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
$tokenizer = new Mustache_Tokenizer;
|
||||
$parser = new Mustache_Parser;
|
||||
$compiler = new Mustache_Compiler;
|
||||
$mustache = new Mustache_Mustache;
|
||||
$mustache = new Mustache_Engine;
|
||||
|
||||
$this->assertNotSame($loader, $mustache->getLoader());
|
||||
$mustache->setLoader($loader);
|
||||
@@ -110,7 +110,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
* @group functional
|
||||
*/
|
||||
public function testCache() {
|
||||
$mustache = new Mustache_Mustache(array(
|
||||
$mustache = new Mustache_Engine(array(
|
||||
'template_class_prefix' => '__whot__',
|
||||
'cache' => self::$tempDir,
|
||||
));
|
||||
@@ -129,7 +129,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
* @dataProvider getBadEscapers
|
||||
*/
|
||||
public function testNonCallableEscapeThrowsException($escape) {
|
||||
new Mustache_Mustache(array('escape' => $escape));
|
||||
new Mustache_Engine(array('escape' => $escape));
|
||||
}
|
||||
|
||||
public function getBadEscapers() {
|
||||
@@ -143,7 +143,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
* @expectedException RuntimeException
|
||||
*/
|
||||
public function testImmutablePartialsLoadersThrowException() {
|
||||
$mustache = new Mustache_Mustache(array(
|
||||
$mustache = new Mustache_Engine(array(
|
||||
'partials_loader' => new Mustache_Loader_StringLoader,
|
||||
));
|
||||
|
||||
@@ -151,7 +151,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
public function testMissingPartialsTreatedAsEmptyString() {
|
||||
$mustache = new Mustache_Mustache(array(
|
||||
$mustache = new Mustache_Engine(array(
|
||||
'partials_loader' => new Mustache_Loader_ArrayLoader(array(
|
||||
'foo' => 'FOO',
|
||||
'baz' => 'BAZ',
|
||||
@@ -164,7 +164,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
public function testHelpers() {
|
||||
$foo = array($this, 'getFoo');
|
||||
$bar = 'BAR';
|
||||
$mustache = new Mustache_Mustache(array('helpers' => array(
|
||||
$mustache = new Mustache_Engine(array('helpers' => array(
|
||||
'foo' => $foo,
|
||||
'bar' => $bar,
|
||||
)));
|
||||
@@ -204,7 +204,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testSetHelpersThrowsExceptions() {
|
||||
$mustache = new Mustache_Mustache;
|
||||
$mustache = new Mustache_Engine;
|
||||
$mustache->setHelpers('monkeymonkeymonkey');
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ class Mustache_Test_MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
class MustacheStub extends Mustache_Mustache {
|
||||
class MustacheStub extends Mustache_Engine {
|
||||
public $source;
|
||||
public $template;
|
||||
public function loadTemplate($source) {
|
||||
@@ -18,7 +18,7 @@ class Mustache_Test_FiveThree_Functional_HigherOrderSectionsTest extends PHPUnit
|
||||
private $mustache;
|
||||
|
||||
public function setUp() {
|
||||
$this->mustache = new Mustache_Mustache;
|
||||
$this->mustache = new Mustache_Engine;
|
||||
}
|
||||
|
||||
public function testAnonymousFunctionSectionCallback() {
|
||||
|
||||
@@ -20,7 +20,7 @@ class Mustache_Test_FiveThree_Functional_MustacheSpecTest extends PHPUnit_Framew
|
||||
private static $mustache;
|
||||
|
||||
public static function setUpBeforeClass() {
|
||||
self::$mustache = new Mustache_Mustache;
|
||||
self::$mustache = new Mustache_Engine;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
class Mustache_Test_Functional_CallTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
public function testCallEatsContext() {
|
||||
$m = new Mustache_Mustache;
|
||||
$m = new Mustache_Engine;
|
||||
$tpl = $m->loadTemplate('{{# foo }}{{ label }}: {{ name }}{{/ foo }}');
|
||||
|
||||
$foo = new Mustache_Test_Functional_ClassWithCall();
|
||||
|
||||
@@ -26,7 +26,7 @@ class Mustache_Test_Functional_ExamplesTest extends PHPUnit_Framework_TestCase {
|
||||
* @param string $expected
|
||||
*/
|
||||
public function testExamples($context, $source, $partials, $expected) {
|
||||
$mustache = new Mustache_Mustache(array(
|
||||
$mustache = new Mustache_Engine(array(
|
||||
'partials' => $partials
|
||||
));
|
||||
$this->assertEquals($expected, $mustache->loadTemplate($source)->render($context));
|
||||
|
||||
@@ -18,7 +18,7 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends PHPUnit_Framework
|
||||
private $mustache;
|
||||
|
||||
public function setUp() {
|
||||
$this->mustache = new Mustache_Mustache;
|
||||
$this->mustache = new Mustache_Engine;
|
||||
}
|
||||
|
||||
public function testRuntimeSectionCallback() {
|
||||
|
||||
@@ -18,7 +18,7 @@ class Mustache_Test_Functional_MustacheInjectionTest extends PHPUnit_Framework_T
|
||||
private $mustache;
|
||||
|
||||
public function setUp() {
|
||||
$this->mustache = new Mustache_Mustache;
|
||||
$this->mustache = new Mustache_Engine;
|
||||
}
|
||||
|
||||
// interpolation
|
||||
|
||||
@@ -20,7 +20,7 @@ class Mustache_Test_Functional_MustacheSpecTest extends PHPUnit_Framework_TestCa
|
||||
private static $mustache;
|
||||
|
||||
public static function setUpBeforeClass() {
|
||||
self::$mustache = new Mustache_Mustache;
|
||||
self::$mustache = new Mustache_Engine;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ class Mustache_Test_Functional_ObjectSectionTest extends PHPUnit_Framework_TestC
|
||||
private $mustache;
|
||||
|
||||
public function setUp() {
|
||||
$this->mustache = new Mustache_Mustache;
|
||||
$this->mustache = new Mustache_Engine;
|
||||
}
|
||||
|
||||
public function testBasicObject() {
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
*/
|
||||
class Mustache_Test_TemplateTest extends PHPUnit_Framework_TestCase {
|
||||
public function testConstructor() {
|
||||
$mustache = new Mustache_Mustache;
|
||||
$mustache = new Mustache_Engine;
|
||||
$template = new Mustache_Test_TemplateStub($mustache);
|
||||
$this->assertSame($mustache, $template->getMustache());
|
||||
}
|
||||
|
||||
public function testRendering() {
|
||||
$rendered = '<< wheee >>';
|
||||
$mustache = new Mustache_Mustache;
|
||||
$mustache = new Mustache_Engine;
|
||||
$template = new Mustache_Test_TemplateStub($mustache);
|
||||
$template->rendered = $rendered;
|
||||
$context = new Mustache_Context;
|
||||
|
||||
Reference in New Issue
Block a user