Example #1
0
 public function testTransformException()
 {
     $template = new Template();
     $template->setDir('tests/PSX/Template/files');
     $template->set('error.htm');
     try {
         $template->transform();
         $this->fail('Must throw an excetion');
     } catch (ErrorException $e) {
         $this->assertInstanceOf('RuntimeException', $e->getOriginException());
         $this->assertEquals('tests/PSX/Template/files/error.htm', $e->getTemplateFile());
         $this->assertEquals('foobar', $e->getRenderedHtml());
     }
 }