aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-13 21:02:12 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-13 21:02:12 +0200
commit5713dcfd11f6d0f57b6302bedeb22c18df5d73bb (patch)
tree0bf552446046fd65238f11ed5bd05e04a1d228ba /tests
parentfea6ac46ef8d49ce5860979b02faeb60be845865 (diff)
downloadnextcloud-server-5713dcfd11f6d0f57b6302bedeb22c18df5d73bb.tar.gz
nextcloud-server-5713dcfd11f6d0f57b6302bedeb22c18df5d73bb.zip
Use $SERVERROOT/tests/data for testGetMimeType
Diffstat (limited to 'tests')
-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
+}