summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-27 07:46:32 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-11-27 07:46:32 +0100
commitdbb034f903fa59c4cd0f291ac5fc27bbed383e5e (patch)
tree52469e78ced1ffab55c337b74eb11edf551e5b24 /tests
parent645fc993c245f198a2da26aea0619e840eef3f3e (diff)
downloadnextcloud-server-dbb034f903fa59c4cd0f291ac5fc27bbed383e5e.tar.gz
nextcloud-server-dbb034f903fa59c4cd0f291ac5fc27bbed383e5e.zip
Remove unused mimetype detection method in OC_Image
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/ImageTest.php17
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php
index b7255ccdbd6..b4cb57f3787 100644
--- a/tests/lib/ImageTest.php
+++ b/tests/lib/ImageTest.php
@@ -19,20 +19,6 @@ class ImageTest extends \Test\TestCase {
parent::tearDownAfterClass();
}
- public function testGetMimeTypeForFile() {
- $mimetype = \OC_Image::getMimeTypeForFile(OC::$SERVERROOT.'/tests/data/testimage.png');
- $this->assertEquals('image/png', $mimetype);
-
- $mimetype = \OC_Image::getMimeTypeForFile(OC::$SERVERROOT.'/tests/data/testimage.jpg');
- $this->assertEquals('image/jpeg', $mimetype);
-
- $mimetype = \OC_Image::getMimeTypeForFile(OC::$SERVERROOT.'/tests/data/testimage.gif');
- $this->assertEquals('image/gif', $mimetype);
-
- $mimetype = \OC_Image::getMimeTypeForFile(null);
- $this->assertEquals('', $mimetype);
- }
-
public function testConstructDestruct() {
$img = new \OC_Image(OC::$SERVERROOT.'/tests/data/testimage.png');
$this->assertInstanceOf('\OC_Image', $img);
@@ -337,7 +323,6 @@ class ImageTest extends \Test\TestCase {
$tempFile = tempnam(sys_get_temp_dir(), 'img-test');
$img->save($tempFile, $mimeType);
- $actualMimeType = \OC_Image::getMimeTypeForFile($tempFile);
- $this->assertEquals($mimeType, $actualMimeType);
+ $this->assertEquals($mimeType, image_type_to_mime_type(exif_imagetype($tempFile)));
}
}