diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-11-27 11:55:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 11:55:20 +0100 |
commit | fb1a92b07df9f485eabd3374c68419f11518f799 (patch) | |
tree | 6e4b8b78e80e7d8977d7a181c4bb04645bf3cb5d /tests | |
parent | 8ccb4868762b13adc02f49654a7867b556009a41 (diff) | |
parent | dbb034f903fa59c4cd0f291ac5fc27bbed383e5e (diff) | |
download | nextcloud-server-fb1a92b07df9f485eabd3374c68419f11518f799.tar.gz nextcloud-server-fb1a92b07df9f485eabd3374c68419f11518f799.zip |
Merge pull request #7295 from nextcloud/remove-unused-method
Remove unused mimetype detection method in OC_Image
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))); } } |