Update to proposed PSR-1 coding standard.
* 4 space (no tab) indent * K&R-style braces
This commit is contained in:
@@ -12,35 +12,40 @@
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
class Mustache_Test_Loader_FilesystemLoaderTest extends PHPUnit_Framework_TestCase {
|
||||
public function testConstructor() {
|
||||
$baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
|
||||
$loader = new Mustache_Loader_FilesystemLoader($baseDir, array('extension' => '.ms'));
|
||||
$this->assertEquals('alpha contents', $loader->load('alpha'));
|
||||
$this->assertEquals('beta contents', $loader->load('beta.ms'));
|
||||
}
|
||||
class Mustache_Test_Loader_FilesystemLoaderTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testConstructor()
|
||||
{
|
||||
$baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
|
||||
$loader = new Mustache_Loader_FilesystemLoader($baseDir, array('extension' => '.ms'));
|
||||
$this->assertEquals('alpha contents', $loader->load('alpha'));
|
||||
$this->assertEquals('beta contents', $loader->load('beta.ms'));
|
||||
}
|
||||
|
||||
public function testLoadTemplates() {
|
||||
$baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
|
||||
$loader = new Mustache_Loader_FilesystemLoader($baseDir);
|
||||
$this->assertEquals('one contents', $loader->load('one'));
|
||||
$this->assertEquals('two contents', $loader->load('two.mustache'));
|
||||
}
|
||||
public function testLoadTemplates()
|
||||
{
|
||||
$baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
|
||||
$loader = new Mustache_Loader_FilesystemLoader($baseDir);
|
||||
$this->assertEquals('one contents', $loader->load('one'));
|
||||
$this->assertEquals('two contents', $loader->load('two.mustache'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException RuntimeException
|
||||
*/
|
||||
public function testMissingBaseDirThrowsException() {
|
||||
$loader = new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/not_a_directory');
|
||||
}
|
||||
/**
|
||||
* @expectedException RuntimeException
|
||||
*/
|
||||
public function testMissingBaseDirThrowsException()
|
||||
{
|
||||
$loader = new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/not_a_directory');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testMissingTemplateThrowsException() {
|
||||
$baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
|
||||
$loader = new Mustache_Loader_FilesystemLoader($baseDir);
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testMissingTemplateThrowsException()
|
||||
{
|
||||
$baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
|
||||
$loader = new Mustache_Loader_FilesystemLoader($baseDir);
|
||||
|
||||
$loader->load('fake');
|
||||
}
|
||||
$loader->load('fake');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user