示例#1
0
 public function testLoad()
 {
     $loader = new ProjectTemplateLoader1(array(self::$loader1, self::$loader2));
     $this->assertTrue($loader->load('bar') === false, '->load() returns false if the template is not found');
     $this->assertTrue($loader->load('foo', array('renderer' => 'xml')) === false, '->load() returns false if the template does not exists for the given renderer');
     $this->assertTrue($loader->load('foo') instanceof FileStorage, '->load() returns a FileStorage if the template exists');
 }
 public function testLoad()
 {
     $loader = new ProjectTemplateLoader1(array(self::$loader1, self::$loader2));
     $this->assertFalse($loader->load('bar'), '->load() returns false if the template is not found');
     $this->assertFalse($loader->load('foo', array('renderer' => 'xml')), '->load() returns false if the template does not exists for the given renderer');
     $this->assertInstanceOf('Symfony\\Components\\Templating\\Storage\\FileStorage', $loader->load('foo'), '->load() returns a FileStorage if the template exists');
 }