Hey guys!
I got a question regarding simpletest. Thanks in advance to everybody who wants help me out.
My team and I want to use Simpletest with Eclipse and thus I am the "scout" testing it all out. Installation went perfectly fine, the standard tests, too.
Now I wanted to load it with the rest of the application meaning I require_once some of our files to get a database connection, etc. There are two slight problems though:
1) We define constants LOG_MESSAGE, LOG_WARNING and LOG_NOTICE. Simpletest broke because it found duplicated constant declaration for those. Does SimpleTest declare those as well?
2) When i manually fix problem 1 by changing our constants I get:
{status:"fail",message:"Bad GroupTest [C:\\ll_development\\workspace\\linklift\\tests\\database\\updateHistory.test.php] with error [strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Europe\/Paris' for '2.0\/DST' instead]",group:"C:\\ll_development\\workspace\\linklift\\tests\\database\\updateHistory.test.php",case:"",method:""}
..in the eclipse console.
How can I make simpletest ignore those and simply run the test?
Here is the test:
PHP Code:<?php
define('ROOT','C:\ll_development\workspace\company_name\html\php\\');
require_once(ROOT.'LL_Constants.class.php');
require_once(ROOT.'LL_Database.class.php');
class test1 extends UnitTestCase {
protected $db = null;
public function __construct() {
parent::__cosntruct();
$this->db = new LL_Database;
}
public function testForValidInput() {
$this->assertEquals(ERROR_UNEXPECTED_INPUT,$this->db->updateAdspaceHistory(''));
$this->assertEquals(ERROR_UNEXPECTED_INPUT,$this->db->updateAdspaceHistory('',array()));
$this->assertEquals(ERROR_UNEXPECTED_INPUT,$this->db->updateAdspaceHistory('34525623',array()));
}
}
?>






Bookmarks