Add exception chaining
This commit is contained in:
@@ -29,4 +29,15 @@ class Mustache_Test_Exception_UnknownTemplateExceptionTest extends PHPUnit_Frame
|
||||
$e = new Mustache_Exception_UnknownTemplateException('yoshi');
|
||||
$this->assertEquals('yoshi', $e->getTemplateName());
|
||||
}
|
||||
|
||||
public function testPrevious()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
||||
$this->markTestSkipped('Exception chaining requires at least PHP 5.3');
|
||||
}
|
||||
|
||||
$previous = new Exception();
|
||||
$e = new Mustache_Exception_UnknownTemplateException('foo', $previous);
|
||||
$this->assertSame($previous, $e->getPrevious());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user