summaryrefslogtreecommitdiff
path: root/ext/date/tests/DateTimeZone_verify.phpt
blob: f28742d26a5f7e2f509f876ff9946e4afe202d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
--TEST--
Test DateTimeZone class registration
--FILE--
<?php

echo "*** Verify DateTimeZone class ***\n";

echo "Verify DateTimeZone class registered OK\n";
$class = new ReflectionClass('DateTimeZone');
var_dump($class);

echo "..and get names of all its methods\n";
$methods = $class->getMethods(); 
var_dump($methods);

echo "..and get names of all its class constants\n"; 
$constants = $class->getConstants();
var_dump($constants);
?>
===DONE===
--EXPECTF--
*** Verify DateTimeZone class ***
Verify DateTimeZone class registered OK
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(12) "DateTimeZone"
}
..and get names of all its methods
array(9) {
  [0]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(11) "__construct"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [1]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(8) "__wakeup"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [2]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(11) "__set_state"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [3]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(7) "getName"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [4]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(9) "getOffset"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [5]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(14) "getTransitions"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [6]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(11) "getLocation"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [7]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(17) "listAbbreviations"
    ["class"]=>
    string(12) "DateTimeZone"
  }
  [8]=>
  object(ReflectionMethod)#%d (2) {
    ["name"]=>
    string(15) "listIdentifiers"
    ["class"]=>
    string(12) "DateTimeZone"
  }
}
..and get names of all its class constants
array(14) {
  ["AFRICA"]=>
  int(1)
  ["AMERICA"]=>
  int(2)
  ["ANTARCTICA"]=>
  int(4)
  ["ARCTIC"]=>
  int(8)
  ["ASIA"]=>
  int(16)
  ["ATLANTIC"]=>
  int(32)
  ["AUSTRALIA"]=>
  int(64)
  ["EUROPE"]=>
  int(128)
  ["INDIAN"]=>
  int(256)
  ["PACIFIC"]=>
  int(512)
  ["UTC"]=>
  int(1024)
  ["ALL"]=>
  int(2047)
  ["ALL_WITH_BC"]=>
  int(4095)
  ["PER_COUNTRY"]=>
  int(4096)
}
===DONE===