diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-27 07:46:32 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-11-27 07:46:32 +0100 |
commit | dbb034f903fa59c4cd0f291ac5fc27bbed383e5e (patch) | |
tree | 52469e78ced1ffab55c337b74eb11edf551e5b24 /tests | |
parent | 645fc993c245f198a2da26aea0619e840eef3f3e (diff) | |
download | nextcloud-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.php | 17 |
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))); } } |