server/tests/lib/geo.php

24 lines
534 B
PHP
Raw Normal View History

2012-10-13 12:35:18 +00:00
<?php
/**
* Copyright (c) 2012 Lukas Reschke <lukas@statuscode.ch>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
2013-01-24 15:47:17 +00:00
class Test_Geo extends PHPUnit_Framework_TestCase {
/**
* @medium
*/
2012-10-13 12:35:18 +00:00
function testTimezone() {
2012-11-02 18:53:02 +00:00
$result = OC_Geo::timezone(3, 3);
2012-10-13 12:35:18 +00:00
$expected = 'Africa/Porto-Novo';
2012-10-18 19:11:41 +00:00
$this->assertEquals($expected, $result);
2012-10-13 12:35:18 +00:00
$result = OC_Geo::timezone(-3,-3333);
$expected = 'Pacific/Enderbury';
2012-10-18 15:34:24 +00:00
$this->assertEquals($expected, $result);
2012-10-13 12:35:18 +00:00
}
}