DateTimeZone_verify.phpt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. --TEST--
  2. Test DateTimeZone class registration
  3. --FILE--
  4. <?php
  5. echo "*** Verify DateTimeZone class ***\n";
  6. echo "Verify DateTimeZone class registered OK\n";
  7. $class = new ReflectionClass('DateTimeZone');
  8. var_dump($class);
  9. echo "..and get names of all its methods\n";
  10. $methods = $class->getMethods();
  11. var_dump($methods);
  12. echo "..and get names of all its class constants\n";
  13. $constants = $class->getConstants();
  14. var_dump($constants);
  15. ?>
  16. ===DONE===
  17. --EXPECTF--
  18. *** Verify DateTimeZone class ***
  19. Verify DateTimeZone class registered OK
  20. object(ReflectionClass)#%d (1) {
  21. ["name"]=>
  22. string(12) "DateTimeZone"
  23. }
  24. ..and get names of all its methods
  25. array(9) {
  26. [0]=>
  27. &object(ReflectionMethod)#%d (2) {
  28. ["name"]=>
  29. string(11) "__construct"
  30. ["class"]=>
  31. string(12) "DateTimeZone"
  32. }
  33. [1]=>
  34. &object(ReflectionMethod)#%d (2) {
  35. ["name"]=>
  36. string(8) "__wakeup"
  37. ["class"]=>
  38. string(12) "DateTimeZone"
  39. }
  40. [2]=>
  41. &object(ReflectionMethod)#%d (2) {
  42. ["name"]=>
  43. string(11) "__set_state"
  44. ["class"]=>
  45. string(12) "DateTimeZone"
  46. }
  47. [3]=>
  48. &object(ReflectionMethod)#%d (2) {
  49. ["name"]=>
  50. string(7) "getName"
  51. ["class"]=>
  52. string(12) "DateTimeZone"
  53. }
  54. [4]=>
  55. &object(ReflectionMethod)#%d (2) {
  56. ["name"]=>
  57. string(9) "getOffset"
  58. ["class"]=>
  59. string(12) "DateTimeZone"
  60. }
  61. [5]=>
  62. &object(ReflectionMethod)#%d (2) {
  63. ["name"]=>
  64. string(14) "getTransitions"
  65. ["class"]=>
  66. string(12) "DateTimeZone"
  67. }
  68. [6]=>
  69. &object(ReflectionMethod)#%d (2) {
  70. ["name"]=>
  71. string(11) "getLocation"
  72. ["class"]=>
  73. string(12) "DateTimeZone"
  74. }
  75. [7]=>
  76. &object(ReflectionMethod)#%d (2) {
  77. ["name"]=>
  78. string(17) "listAbbreviations"
  79. ["class"]=>
  80. string(12) "DateTimeZone"
  81. }
  82. [8]=>
  83. &object(ReflectionMethod)#%d (2) {
  84. ["name"]=>
  85. string(15) "listIdentifiers"
  86. ["class"]=>
  87. string(12) "DateTimeZone"
  88. }
  89. }
  90. ..and get names of all its class constants
  91. array(14) {
  92. ["AFRICA"]=>
  93. int(1)
  94. ["AMERICA"]=>
  95. int(2)
  96. ["ANTARCTICA"]=>
  97. int(4)
  98. ["ARCTIC"]=>
  99. int(8)
  100. ["ASIA"]=>
  101. int(16)
  102. ["ATLANTIC"]=>
  103. int(32)
  104. ["AUSTRALIA"]=>
  105. int(64)
  106. ["EUROPE"]=>
  107. int(128)
  108. ["INDIAN"]=>
  109. int(256)
  110. ["PACIFIC"]=>
  111. int(512)
  112. ["UTC"]=>
  113. int(1024)
  114. ["ALL"]=>
  115. int(2047)
  116. ["ALL_WITH_BC"]=>
  117. int(4095)
  118. ["PER_COUNTRY"]=>
  119. int(4096)
  120. }
  121. ===DONE===