2012-10-13 16:35:18 +04: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 19:47:17 +04:00
|
|
|
class Test_Geo extends PHPUnit_Framework_TestCase {
|
2013-06-10 12:17:47 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @medium
|
|
|
|
*/
|
2012-10-13 16:35:18 +04:00
|
|
|
function testTimezone() {
|
2012-11-02 22:53:02 +04:00
|
|
|
$result = OC_Geo::timezone(3, 3);
|
2012-10-13 16:35:18 +04:00
|
|
|
$expected = 'Africa/Porto-Novo';
|
2012-10-18 23:11:41 +04:00
|
|
|
$this->assertEquals($expected, $result);
|
2012-10-13 16:35:18 +04:00
|
|
|
|
|
|
|
$result = OC_Geo::timezone(-3,-3333);
|
|
|
|
$expected = 'Pacific/Enderbury';
|
2012-10-18 19:34:24 +04:00
|
|
|
$this->assertEquals($expected, $result);
|
2012-10-13 16:35:18 +04:00
|
|
|
}
|
2013-08-18 13:02:08 +04:00
|
|
|
}
|