Removed deprecated unsused function OC_Helper::getStringMimeType
This commit is contained in:
parent
4f20e3bac0
commit
a54be132fc
|
@ -346,17 +346,6 @@ class OC_Helper {
|
||||||
return \OC::$server->getMimeTypeDetector()->detectPath($path);
|
return \OC::$server->getMimeTypeDetector()->detectPath($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* get the mimetype form a data string
|
|
||||||
*
|
|
||||||
* @param string $data
|
|
||||||
* @return string
|
|
||||||
* @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->detectString($data)
|
|
||||||
*/
|
|
||||||
static function getStringMimeType($data) {
|
|
||||||
return \OC::$server->getMimeTypeDetector()->detectString($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* detect if a given program is found in the search PATH
|
* detect if a given program is found in the search PATH
|
||||||
*
|
*
|
||||||
|
|
|
@ -71,16 +71,6 @@ class Test_Helper extends \Test\TestCase {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
function testGetStringMimeType() {
|
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] Strings have mimetype application/octet-stream on Windows');
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = OC_Helper::getStringMimeType("/data/data.tar.gz");
|
|
||||||
$expected = 'text/plain; charset=us-ascii';
|
|
||||||
$this->assertEquals($result, $expected);
|
|
||||||
}
|
|
||||||
|
|
||||||
function testIsSubDirectory() {
|
function testIsSubDirectory() {
|
||||||
$result = OC_Helper::isSubDirectory("./data/", "/anotherDirectory/");
|
$result = OC_Helper::isSubDirectory("./data/", "/anotherDirectory/");
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
|
Loading…
Reference in New Issue