Improve Mustache exception types, catchability.
* Subclass common exception types (runtime, logic, invalid argument). * Add new "unknown x" exceptions for filters, helpers and templates. * Make all Mustache exceptions implement Mustache_Exception interface… Gotta catch 'em all!
This commit is contained in:
@@ -34,7 +34,7 @@ class Mustache_Test_Logger_StreamLoggerTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException LogicException
|
||||
* @expectedException Mustache_Exception_LogicException
|
||||
*/
|
||||
public function testPrematurelyClosedStreamThrowsException()
|
||||
{
|
||||
@@ -187,7 +187,7 @@ class Mustache_Test_Logger_StreamLoggerTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException Mustache_Exception_InvalidArgumentException
|
||||
*/
|
||||
public function testThrowsInvalidArgumentExceptionWhenSettingUnknownLevels()
|
||||
{
|
||||
@@ -196,7 +196,7 @@ class Mustache_Test_Logger_StreamLoggerTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException Mustache_Exception_InvalidArgumentException
|
||||
*/
|
||||
public function testThrowsInvalidArgumentExceptionWhenLoggingUnknownLevels()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user