summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-13 14:35:18 +0200
committerLukas Reschke <lukas@statuscode.ch>2012-10-13 14:35:20 +0200
commit3c3e8c6c9898cfdf9861680b7e85534aed9af9e2 (patch)
treea9f66ffe9446b0ff909fb2f76671d37008c55eed /tests
parent8a87585c9d7c9b892b86c51349f536eb019a71cc (diff)
downloadnextcloud-server-3c3e8c6c9898cfdf9861680b7e85534aed9af9e2.tar.gz
nextcloud-server-3c3e8c6c9898cfdf9861680b7e85534aed9af9e2.zip
Test for geo.php
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/geo.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/geo.php b/tests/lib/geo.php
new file mode 100644
index 00000000000..2b3599ab9b9
--- /dev/null
+++ b/tests/lib/geo.php
@@ -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);
+ }
+} \ No newline at end of file