Skip to content
Snippets Groups Projects
Commit f169984c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Better test

parent 7cdc7c0a
No related branches found
No related tags found
No related merge requests found
......@@ -301,7 +301,21 @@ class DateLibTest extends PHPUnit_Framework_TestCase
$langs=$this->savlangs;
$db=$this->savdb;
$stime='1970-01-01T02:00:00Z';
$conf->global->MAIN_OLD_DATE=1;
$stime='19700102';
$result=dol_stringtotime($stime);
print __METHOD__." result=".$result."\n";
$this->assertEquals(86400,$result);
$conf->global->MAIN_OLD_DATE=0;
$stime='19700102';
$result=dol_stringtotime($stime);
print __METHOD__." result=".$result."\n";
$this->assertEquals(86400,$result);
$stime='1970-01-01T02:00:00Z';
$result=dol_stringtotime($stime);
print __METHOD__." result=".$result."\n";
$this->assertEquals(7200,$result);
......@@ -310,7 +324,7 @@ class DateLibTest extends PHPUnit_Framework_TestCase
$result=dol_stringtotime($stime);
print __METHOD__." result=".$result."\n";
$this->assertEquals(7200,$result);
$stime='19700101T020000Z';
$result=dol_stringtotime($stime);
print __METHOD__." result=".$result."\n";
......@@ -321,11 +335,6 @@ class DateLibTest extends PHPUnit_Framework_TestCase
print __METHOD__." result=".$result."\n";
$this->assertEquals(7200,$result);
$stime='19700101';
$result=dol_stringtotime($stime);
print __METHOD__." result=".$result."\n";
$this->assertEquals(0,$result);
return $result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment