Unit testing CakePHP致命错误:类';ErrorHandler';找不到

Unit testing CakePHP致命错误:类';ErrorHandler';找不到,unit-testing,cakephp,error-handling,Unit Testing,Cakephp,Error Handling,我已经通过“蛋糕烘焙测试套装”生成了测试套装,并将localhost/test.php用于我的应用程序。 因此,当我尝试运行其中一个测试时,出现了错误(否则测试有效): 致命错误:在第201行的Z:\home\prodvigator\www\cake\libs\object.php中找不到类“ErrorHandler” 这个模型和控制器是由scaffold生成的,我不认为这是一个错误 使用: CakePHP1.3 最新的SimpleTest尝试检查生成的测试是否存在写入文件顶部的错误 有时我

我已经通过“蛋糕烘焙测试套装”生成了测试套装,并将localhost/test.php用于我的应用程序。 因此,当我尝试运行其中一个测试时,出现了错误(否则测试有效):

致命错误:在第201行的Z:\home\prodvigator\www\cake\libs\object.php中找不到类“ErrorHandler”
这个模型和控制器是由scaffold生成的,我不认为这是一个错误

使用: CakePHP1.3
最新的SimpleTest

尝试检查生成的测试是否存在写入文件顶部的错误

有时我在模型和控制器测试中都会发现类似的情况

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /projectname/cake/console/templates/default/classes/test.ctp on line 22

就我而言,错误是:

Fatal error: Uncaught Error: Class 'ErrorHandler' not found in C:\[path]\core\cake\libs\object.php on line 211
( ! ) Error: Class 'ErrorHandler' not found in C:\[path]\core\cake\libs\object.php on line 211
我试图访问时出错了

我已经在app\views\user\u accounts\index.ctp创建了包含以下内容的视图:

<div>
    Text from div
</div>

在我的例子中,删除文件夹
/app/tmp/cache/persistent
中的所有文件解决了问题

<div>
    Text from div
</div>
<?php 
    class UserAccountsController extends AppController {
        public function index() {
            // Render the view in /views/user_accounts/index.ctp
            $this->render();
        }
    }
?>
<?php 
    class UserAccountsController extends AppController {
        // Use this controller without a need for a corresponding Model file.
        var $uses = array();
        public function index() {
            // Render the view in /views/user_accounts/index.ctp
            $this->render();
        }
    }
?>