X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Ftestsuite.php;h=3b33f8083987aeb96a1767332821f2e7b83faa9f;hb=9107200d73d380c154d92ebb9d5452f3a3c8169d;hp=0164c6662e490fdf148363c05f7b1159a942d313;hpb=b923ad1d43fa485f3d4d71d2bae9b80fcbec9caa;p=plcapi.git diff --git a/test/testsuite.php b/test/testsuite.php index 0164c66..3b33f80 100644 --- a/test/testsuite.php +++ b/test/testsuite.php @@ -228,8 +228,12 @@ And turned it into nylon'; if (class_exists('DateTime')) { $datetime = new DateTime(); - $t3 = new xmlrpcval($datetime->setTimestamp($time), 'dateTime.iso8601'); - $this->assertEquals($t1->serialize(), $t3->serialize()); + // skip this test for php 5.2. It is a bit harder there to build a DateTime from unix timestamp with proper TZ info + if(is_callable(array($datetime,'setTimestamp'))) + { + $t3 = new xmlrpcval($datetime->setTimestamp($time), 'dateTime.iso8601'); + $this->assertEquals($t1->serialize(), $t3->serialize()); + } } }