Annotation of embedaddon/php/ext/date/tests/timezone_abbreviations_list_basic1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test timezone_abbreviations_list() function : basic functionality
3: --FILE--
4: <?php
5: /* Prototype : array timezone_abbreviations_list ( void )
6: * Description: Returns associative array containing dst, offset and the timezone name
7: * Source code: ext/date/php_date.c
8: * Alias to functions: DateTimeZone::listAbbreviations
9: */
10:
11: echo "*** Testing timezone_abbreviations_list() : basic functionality ***\n";
12:
13: //Set the default time zone
14: date_default_timezone_set("GMT");
15:
16: $abbr = timezone_abbreviations_list();
17:
18: var_dump( gettype($abbr) );
19: var_dump( count($abbr) );
20:
21: echo "\n-- Format a sample entry --\n";
22: var_dump( $abbr["acst"] );
23:
24: ?>
25: ===DONE===
26: --EXPECTF--
27: *** Testing timezone_abbreviations_list() : basic functionality ***
28: string(5) "array"
29: int(%d)
30:
31: -- Format a sample entry --
32: array(4) {
33: [0]=>
34: array(3) {
35: ["dst"]=>
36: bool(true)
37: ["offset"]=>
38: int(-14400)
39: ["timezone_id"]=>
40: string(18) "America/Porto_Acre"
41: }
42: [1]=>
43: array(3) {
44: ["dst"]=>
45: bool(true)
46: ["offset"]=>
47: int(-14400)
48: ["timezone_id"]=>
49: string(16) "America/Eirunepe"
50: }
51: [2]=>
52: array(3) {
53: ["dst"]=>
54: bool(true)
55: ["offset"]=>
56: int(-14400)
57: ["timezone_id"]=>
58: string(18) "America/Rio_Branco"
59: }
60: [3]=>
61: array(3) {
62: ["dst"]=>
63: bool(true)
64: ["offset"]=>
65: int(-14400)
66: ["timezone_id"]=>
67: string(11) "Brazil/Acre"
68: }
69: }
70: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>