Update to proposed PSR-1 coding standard.
* 4 space (no tab) indent * K&R-style braces
This commit is contained in:
@@ -12,37 +12,41 @@
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
class Mustache_Test_Loader_ArrayLoaderTest extends PHPUnit_Framework_TestCase {
|
||||
public function testConstructor() {
|
||||
$loader = new Mustache_Loader_ArrayLoader(array(
|
||||
'foo' => 'bar'
|
||||
));
|
||||
class Mustache_Test_Loader_ArrayLoaderTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testConstructor()
|
||||
{
|
||||
$loader = new Mustache_Loader_ArrayLoader(array(
|
||||
'foo' => 'bar'
|
||||
));
|
||||
|
||||
$this->assertEquals('bar', $loader->load('foo'));
|
||||
}
|
||||
$this->assertEquals('bar', $loader->load('foo'));
|
||||
}
|
||||
|
||||
public function testSetAndLoadTemplates() {
|
||||
$loader = new Mustache_Loader_ArrayLoader(array(
|
||||
'foo' => 'bar'
|
||||
));
|
||||
$this->assertEquals('bar', $loader->load('foo'));
|
||||
public function testSetAndLoadTemplates()
|
||||
{
|
||||
$loader = new Mustache_Loader_ArrayLoader(array(
|
||||
'foo' => 'bar'
|
||||
));
|
||||
$this->assertEquals('bar', $loader->load('foo'));
|
||||
|
||||
$loader->setTemplate('baz', 'qux');
|
||||
$this->assertEquals('qux', $loader->load('baz'));
|
||||
$loader->setTemplate('baz', 'qux');
|
||||
$this->assertEquals('qux', $loader->load('baz'));
|
||||
|
||||
$loader->setTemplates(array(
|
||||
'foo' => 'FOO',
|
||||
'baz' => 'BAZ',
|
||||
));
|
||||
$this->assertEquals('FOO', $loader->load('foo'));
|
||||
$this->assertEquals('BAZ', $loader->load('baz'));
|
||||
}
|
||||
$loader->setTemplates(array(
|
||||
'foo' => 'FOO',
|
||||
'baz' => 'BAZ',
|
||||
));
|
||||
$this->assertEquals('FOO', $loader->load('foo'));
|
||||
$this->assertEquals('BAZ', $loader->load('baz'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testMissingTemplatesThrowExceptions() {
|
||||
$loader = new Mustache_Loader_ArrayLoader;
|
||||
$loader->load('not_a_real_template');
|
||||
}
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testMissingTemplatesThrowExceptions()
|
||||
{
|
||||
$loader = new Mustache_Loader_ArrayLoader;
|
||||
$loader->load('not_a_real_template');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user