我正在尝试学习 Codeception 并将它与 Yii 一起使用(我也是新手)。
开箱即用,我在运行测试时遇到了一些问题。我已经浏览了快速入门指南,当我通过终端运行它时,我收到了这个错误:
Codeception PHP Testing Framework v1.6.6
Powered by PHPUnit 3.7.24 by Sebastian Bergmann.
[Exception]
DateTime::__construct(): 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 tim
ezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead
现在,我正在使用 MAMP,并在我的 php.ini 文件中设置了时区。我也尝试在 index.php 文件中手动设置它,但_default_timezone_set('America/Chicago');
我仍然收到相同的消息。
当我使用 Yii 时,我尝试为 Codeception 启用 Yii 模块,但这似乎没有任何区别。
更新
我已经尝试在一个非基于 yii 的项目上安装 codeception,所以一个简单的网站,我得到了与上面完全相同的错误。