diff options
Diffstat (limited to 'tests')
-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); |