diff options
author | Joas Schilling <coding@schilljs.com> | 2017-02-22 12:11:42 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-02-22 14:53:15 +0100 |
commit | 1e281bc616fc0034a4098999cf83d0d1115f5bb8 (patch) | |
tree | a9a5556712ec96fb146d4773c363d29fbde3e23b /tests/lib/ImageTest.php | |
parent | 182bfd9f2365483c4516c7ed4eb12948c5e66193 (diff) | |
download | nextcloud-server-1e281bc616fc0034a4098999cf83d0d1115f5bb8.tar.gz nextcloud-server-1e281bc616fc0034a4098999cf83d0d1115f5bb8.zip |
Use 90% JPEG quality for thumbnails and previews by default
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/ImageTest.php')
-rw-r--r-- | tests/lib/ImageTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php index 9176b8cf6c9..b7255ccdbd6 100644 --- a/tests/lib/ImageTest.php +++ b/tests/lib/ImageTest.php @@ -9,6 +9,7 @@ namespace Test; use OC; +use OCP\IConfig; class ImageTest extends \Test\TestCase { public static function tearDownAfterClass() { @@ -133,7 +134,12 @@ class ImageTest extends \Test\TestCase { $expected = ob_get_clean(); $this->assertEquals($expected, $img->data()); - $img = new \OC_Image(OC::$SERVERROOT.'/tests/data/testimage.jpg'); + $config = $this->createMock(IConfig::class); + $config->expects($this->once()) + ->method('getAppValue') + ->with('preview', 'jpeg_quality', 90) + ->willReturn(null); + $img = new \OC_Image(OC::$SERVERROOT.'/tests/data/testimage.jpg', null, $config); $raw = imagecreatefromstring(file_get_contents(OC::$SERVERROOT.'/tests/data/testimage.jpg')); ob_start(); imagejpeg($raw); |