geo.php 495 B

12345678910111213141516171819
  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 UnitTestCase {
  9. function testTimezone() {
  10. $result = OC_Geo::timezone(3, 3);
  11. $expected = 'Africa/Porto-Novo';
  12. $this->assertEquals($expected, $result);
  13. $result = OC_Geo::timezone(-3,-3333);
  14. $expected = 'Pacific/Enderbury';
  15. $this->assertEquals($expected, $result);
  16. }
  17. }