summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-05-02 13:23:02 +0200
committerRobin Appelman <robin@icewind.nl>2017-05-02 13:43:48 +0200
commit2847e9f2e3e5f338ba1b727ea207b2c549d38e92 (patch)
tree2d02bae05b684c72656950349be451ce84db39ce /tests
parent23cc309606443003c3478d96452998b109ea9c09 (diff)
downloadnextcloud-server-2847e9f2e3e5f338ba1b727ea207b2c549d38e92.tar.gz
nextcloud-server-2847e9f2e3e5f338ba1b727ea207b2c549d38e92.zip
fix preview tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Preview/GeneratorTest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php
index 50d46ae932d..f1383b0691b 100644
--- a/tests/lib/Preview/GeneratorTest.php
+++ b/tests/lib/Preview/GeneratorTest.php
@@ -169,6 +169,7 @@ class GeneratorTest extends \Test\TestCase {
$image = $this->createMock(IImage::class);
$image->method('width')->willReturn(2048);
$image->method('height')->willReturn(2048);
+ $image->method('valid')->willReturn(true);
$this->helper->method('getThumbnail')
->will($this->returnCallback(function ($provider, $file, $x, $y) use ($invalidProvider, $validProvider, $image) {
@@ -217,6 +218,7 @@ class GeneratorTest extends \Test\TestCase {
->with(128);
$image->method('data')
->willReturn('my resized data');
+ $image->method('valid')->willReturn(true);
$previewFile->expects($this->once())
->method('putContent')
@@ -379,6 +381,7 @@ class GeneratorTest extends \Test\TestCase {
->willReturn($image);
$image->method('height')->willReturn($maxY);
$image->method('width')->willReturn($maxX);
+ $image->method('valid')->willReturn(true);
$preview = $this->createMock(ISimpleFile::class);
$previewFolder->method('newFile')