geo.php 522 B

1234567891011121314151617181920212223
  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 \Test\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. }