update CS by php-cs-fixer
This commit is contained in:
@@ -18,7 +18,7 @@ class Mustache_Test_Functional_CallTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testCallEatsContext()
|
||||
{
|
||||
$m = new Mustache_Engine;
|
||||
$m = new Mustache_Engine();
|
||||
$tpl = $m->loadTemplate('{{# foo }}{{ label }}: {{ name }}{{/ foo }}');
|
||||
|
||||
$foo = new Mustache_Test_Functional_ClassWithCall();
|
||||
|
||||
@@ -93,7 +93,7 @@ class Mustache_Test_Functional_ExamplesTest extends PHPUnit_Framework_TestCase
|
||||
switch ($info['extension']) {
|
||||
case 'php':
|
||||
require_once $fullpath;
|
||||
$context = new $info['filename'];
|
||||
$context = new $info['filename']();
|
||||
break;
|
||||
|
||||
case 'mustache':
|
||||
|
||||
@@ -19,7 +19,7 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends Mustache_Test_Fun
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->mustache = new Mustache_Engine;
|
||||
$this->mustache = new Mustache_Engine();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,10 +32,10 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends Mustache_Test_Fun
|
||||
|
||||
public function sectionCallbackData()
|
||||
{
|
||||
$foo = new Mustache_Test_Functional_Foo;
|
||||
$foo = new Mustache_Test_Functional_Foo();
|
||||
$foo->doublewrap = array($foo, 'wrapWithBoth');
|
||||
|
||||
$bar = new Mustache_Test_Functional_Foo;
|
||||
$bar = new Mustache_Test_Functional_Foo();
|
||||
$bar->trimmer = array(get_class($bar), 'staticTrim');
|
||||
|
||||
return array(
|
||||
@@ -48,7 +48,7 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends Mustache_Test_Fun
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate('{{#trim}} {{name}} {{/trim}}');
|
||||
|
||||
$foo = new Mustache_Test_Functional_Foo;
|
||||
$foo = new Mustache_Test_Functional_Foo();
|
||||
|
||||
$data = array(
|
||||
'name' => 'Bob',
|
||||
@@ -81,7 +81,7 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends Mustache_Test_Fun
|
||||
|
||||
$tpl = $mustache->loadTemplate('{{#wrap}}NAME{{/wrap}}');
|
||||
|
||||
$foo = new Mustache_Test_Functional_Foo;
|
||||
$foo = new Mustache_Test_Functional_Foo();
|
||||
$foo->wrap = array($foo, 'wrapWithEm');
|
||||
|
||||
$this->assertEquals('<em>NAME</em>', $tpl->render($foo));
|
||||
@@ -96,7 +96,7 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends Mustache_Test_Fun
|
||||
|
||||
$tpl = $mustache->loadTemplate('{{#wrap}}{{name}}{{/wrap}}');
|
||||
|
||||
$foo = new Mustache_Test_Functional_Foo;
|
||||
$foo = new Mustache_Test_Functional_Foo();
|
||||
$foo->wrap = array($foo, 'wrapWithEm');
|
||||
|
||||
$this->assertEquals('<em>' . $foo->name . '</em>', $tpl->render($foo));
|
||||
@@ -115,7 +115,7 @@ class Mustache_Test_Functional_HigherOrderSectionsTest extends Mustache_Test_Fun
|
||||
));
|
||||
|
||||
$tpl = $mustache->loadTemplate('{{#wrap}}{{name}}{{/wrap}}');
|
||||
$foo = new Mustache_Test_Functional_Foo;
|
||||
$foo = new Mustache_Test_Functional_Foo();
|
||||
$foo->wrap = array($foo, 'wrapWithEm');
|
||||
$this->assertEquals('<em>' . $foo->name . '</em>', $tpl->render($foo));
|
||||
$this->assertCount($expect, glob($cacheDir . '/*.php'));
|
||||
|
||||
@@ -20,7 +20,7 @@ class Mustache_Test_Functional_MustacheInjectionTest extends PHPUnit_Framework_T
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->mustache = new Mustache_Engine;
|
||||
$this->mustache = new Mustache_Engine();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,13 +19,13 @@ class Mustache_Test_Functional_ObjectSectionTest extends PHPUnit_Framework_TestC
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->mustache = new Mustache_Engine;
|
||||
$this->mustache = new Mustache_Engine();
|
||||
}
|
||||
|
||||
public function testBasicObject()
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate('{{#foo}}{{name}}{{/foo}}');
|
||||
$this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Alpha));
|
||||
$this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Alpha()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,7 +34,7 @@ class Mustache_Test_Functional_ObjectSectionTest extends PHPUnit_Framework_TestC
|
||||
public function testObjectWithGet()
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate('{{#foo}}{{name}}{{/foo}}');
|
||||
$this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Beta));
|
||||
$this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Beta()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,14 +43,14 @@ class Mustache_Test_Functional_ObjectSectionTest extends PHPUnit_Framework_TestC
|
||||
public function testSectionObjectWithGet()
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate('{{#bar}}{{#foo}}{{name}}{{/foo}}{{/bar}}');
|
||||
$this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Gamma));
|
||||
$this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Gamma()));
|
||||
}
|
||||
|
||||
public function testSectionObjectWithFunction()
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate('{{#foo}}{{name}}{{/foo}}');
|
||||
$alpha = new Mustache_Test_Functional_Alpha;
|
||||
$alpha->foo = new Mustache_Test_Functional_Delta;
|
||||
$alpha = new Mustache_Test_Functional_Alpha();
|
||||
$alpha->foo = new Mustache_Test_Functional_Delta();
|
||||
$this->assertEquals('Foo', $tpl->render($alpha));
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ class Mustache_Test_Functional_Gamma
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bar = new Mustache_Test_Functional_Beta;
|
||||
$this->bar = new Mustache_Test_Functional_Beta();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user