我是使用 simpletest 的新手:http ://www.simpletest.org/用于 PHP 并且在我的服务器上使用 PHP 5.2*,当我尝试根据他们的演示设置初始测试脚本时,我得到一个完整的页面像下面这样的错误...我不确定这是否与 simpletest 不兼容 PHP 5.* 或问题是什么有关,任何见解都值得赞赏.. 看来我仍然可以使用该库它返回错误下方似乎合适的内容,但我想了解这一点,以便修复它..谢谢
这是我用来调用 simpletest 函数的 php 代码示例
<?php
require_once('C:/wamp/www/external/simpletest/simpletest/autorun.php');
class TestOfLogging extends UnitTestCase {
function testFirstLogMessagesCreatesFileIfNonexistent() {
@unlink(dirname(__FILE__) . '/../temp/test.log');
$log = new Log(dirname(__FILE__) . '/../temp/test.log');
$log->message('Should write this to a file');
$this->assertTrue(file_exists(dirname(__FILE__) . '/../temp/test.log'));
}
}
?>
我得到的错误是:
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\external\simpletest\simpletest\unit_tester.php on line 74
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\external\simpletest\simpletest\unit_tester.php on line 89