Annotation of embedaddon/php/ext/date/tests/bug49778.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #49778 (DateInterval::format("%a") is always zero when an interval is created from an ISO string)
3: --FILE--
4: <?php
5: $i=new DateInterval('P7D');
6: var_dump($i);
7: echo $i->format("%d"), "\n";
8: echo $i->format("%a"), "\n";
9: ?>
10: --EXPECT--
1.1.1.2 ! misho 11: object(DateInterval)#1 (15) {
1.1 misho 12: ["y"]=>
13: int(0)
14: ["m"]=>
15: int(0)
16: ["d"]=>
17: int(7)
18: ["h"]=>
19: int(0)
20: ["i"]=>
21: int(0)
22: ["s"]=>
23: int(0)
1.1.1.2 ! misho 24: ["weekday"]=>
! 25: int(0)
! 26: ["weekday_behavior"]=>
! 27: int(0)
! 28: ["first_last_day_of"]=>
! 29: int(0)
1.1 misho 30: ["invert"]=>
31: int(0)
32: ["days"]=>
33: bool(false)
1.1.1.2 ! misho 34: ["special_type"]=>
! 35: int(0)
! 36: ["special_amount"]=>
! 37: int(0)
! 38: ["have_weekday_relative"]=>
! 39: int(0)
! 40: ["have_special_relative"]=>
! 41: int(0)
1.1 misho 42: }
43: 7
44: (unknown)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>