geo.php 534 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Copyright (c) 2012 Lukas Reschke <lukas@statuscode.ch>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. class Test_Geo extends PHPUnit_Framework_TestCase {
  9. /**
  10. * @medium
  11. */
  12. function testTimezone() {
  13. $result = OC_Geo::timezone(3, 3);
  14. $expected = 'Africa/Porto-Novo';
  15. $this->assertEquals($expected, $result);
  16. $result = OC_Geo::timezone(-3,-3333);
  17. $expected = 'Pacific/Enderbury';
  18. $this->assertEquals($expected, $result);
  19. }
  20. }