I am new to using simpletest: http://www.simpletest.org/ for PHP and using PHP 5.2 * on my server, when I try to install a script based on their demo after the initial test, I get a page with errors like the one below ... I'm not sure if this is due to the fact that simpletest is incompatible with PHP 5. * or that there is a problem, any understanding is understood .. it seems that I can still use the library, as it returns what seems appropriate below errors, but I would like to understand this so that I can fix it. thank
Here is an example php code that I use to call a simple function
<?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'));
}
}
?>
And the error I get:
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
source
share