【发布时间】:2014-08-18 05:32:55
【问题描述】:
我在 person_model.php 中有一个方法:
public function getInfo()
{
$result = array();
try
{
// do something
}
catch(Exception $exception)
{
log_message('error', $exception->getMessage());
}
finally
{
return $result;
}
}
如何测试异常并确保在捕获异常时调用 log_message() 方法?
谢谢!!!
【问题讨论】:
标签: php codeigniter exception phpunit