]> granicus.if.org Git - php/commitdiff
Also test against equality
authorWillem-Jan <wjzijderveld@gmail.com>
Mon, 30 Nov 2015 14:35:16 +0000 (15:35 +0100)
committerDerick Rethans <github@derickrethans.nl>
Fri, 29 Jan 2016 14:22:22 +0000 (15:22 +0100)
ext/date/tests/bug68078.phpt

index 49fd0ec2d1334581addc2b70a42870b6bfe5f808..20be0a49c8ecf898b94d7facf2352af996ab910f 100644 (file)
@@ -6,11 +6,14 @@ Comparing datetime objects should account for microseconds
 date_default_timezone_set('UTC');
 $date1 = DateTime::createFromFormat('U.u', '1448889063.3531');
 $date2 = DateTime::createFromFormat('U.u', '1448889063.5216');
+$date3 = DateTime::createFromFormat('U.u', '1448889063.5216');
 
 var_dump($date1 == $date2);
 var_dump($date1 < $date2);
 var_dump($date2 > $date1);
+var_dump($date2 == $date3);
 --EXPECT--
 bool(false)
 bool(true)
 bool(true)
+bool(true)