From: Lukas Reschke Date: Sat, 13 Oct 2012 12:35:18 +0000 (+0200) Subject: Test for geo.php X-Git-Tag: v5.0.0alpha1~768 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3c3e8c6c9898cfdf9861680b7e85534aed9af9e2;p=nextcloud-server.git Test for geo.php --- 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 @@ + + * 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