timezone_location_get.phpt 482 B

123456789101112131415161718192021222324
  1. --TEST--
  2. timezone_location_get: Test that timezone_location_get returns a correct array of information
  3. --CREDITS--
  4. Havard Eide <nucleuz@gmail.com>
  5. #PHPTestFest2009 Norway 2009-06-09 \o/
  6. --INI--
  7. date.timezone=UTC
  8. --FILE--
  9. <?php
  10. $location = timezone_location_get(new DateTimeZone("Europe/Oslo"));
  11. var_dump($location);
  12. ?>
  13. --EXPECT--
  14. array(4) {
  15. ["country_code"]=>
  16. string(2) "NO"
  17. ["latitude"]=>
  18. float(59.91666)
  19. ["longitude"]=>
  20. float(10.75)
  21. ["comments"]=>
  22. string(0) ""
  23. }