aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/lib/helper.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/lib/helper.php b/tests/lib/helper.php
index 62b974b9191..cfb9a799579 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
+}