diff --git a/tests/lib/helper.php b/tests/lib/helper.php index 62b974b919..cfb9a79957 100644 --- a/tests/lib/helper.php +++ b/tests/lib/helper.php @@ -45,23 +45,24 @@ class Test_Helper extends UnitTestCase { } function testGetMimeType() { - $result = OC_Helper::getMimeType("./data/"); + $dir=OC::$SERVERROOT.'/tests/data'; + $result = OC_Helper::getMimeType($dir."/"); $expected = 'httpd/unix-directory'; $this->assertEquals($result, $expected); - $result = OC_Helper::getMimeType("./data/data.tar.gz"); + $result = OC_Helper::getMimeType($dir."/data.tar.gz"); $expected = 'application/x-gzip'; $this->assertEquals($result, $expected); - $result = OC_Helper::getMimeType("./data/data.zip"); + $result = OC_Helper::getMimeType($dir."/data.zip"); $expected = 'application/zip'; $this->assertEquals($result, $expected); - $result = OC_Helper::getMimeType("./data/logo-wide.svg"); + $result = OC_Helper::getMimeType($dir."/logo-wide.svg"); $expected = 'image/svg+xml'; $this->assertEquals($result, $expected); - $result = OC_Helper::getMimeType("./data/logo-wide.png"); + $result = OC_Helper::getMimeType($dir."/logo-wide.png"); $expected = 'image/png'; $this->assertEquals($result, $expected); } @@ -136,4 +137,4 @@ class Test_Helper extends UnitTestCase { $result = OC_Helper::recursiveArraySearch($haystack, "NotFound"); $this->assertFalse($result); } -} \ No newline at end of file +}