Test for geo.php
This commit is contained in:
parent
8a87585c9d
commit
3c3e8c6c98
1 changed files with 19 additions and 0 deletions
19
tests/lib/geo.php
Normal file
19
tests/lib/geo.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
class Test_Geo extends UnitTestCase {
|
||||
function testTimezone() {
|
||||
$result = OC_Geo::timezone(3,3);
|
||||
$expected = 'Africa/Porto-Novo';
|
||||
$this->assertEquals($result, $expected);
|
||||
|
||||
$result = OC_Geo::timezone(-3,-3333);
|
||||
$expected = 'Pacific/Enderbury';
|
||||
$this->assertEquals($result, $expected);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue