Annotation of embedaddon/php/ext/date/tests/DateTimeZone_serialize.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test serialization of DateTimeZone objects
3: --FILE--
4: <?php
5: //Set the default time zone
6: date_default_timezone_set("Europe/London");
7:
8: $tz1 = new DateTimeZone("America/New_York");
9: var_dump( $tz1 );
10: $serialized = serialize($tz1);
11: var_dump($serialized);
12:
13: $tz2 = unserialize($serialized);
14: var_dump($tz2);
15: // Try to use unserialzied object
16: var_dump( $tz2->getName() );
17:
18: ?>
19: ===DONE===
20: --EXPECTF--
21: object(DateTimeZone)#%d (0) {
22: }
23: string(24) "O:12:"DateTimeZone":0:{}"
24: object(DateTimeZone)#%d (0) {
25: }
26:
27: Warning: DateTimeZone::getName(): The DateTimeZone object has not been correctly initialized by its constructor in %s on line %d
28: bool(false)
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>