]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix preview tests 4620/head
authorRobin Appelman <robin@icewind.nl>
Tue, 2 May 2017 11:23:02 +0000 (13:23 +0200)
committerRobin Appelman <robin@icewind.nl>
Tue, 2 May 2017 11:43:48 +0000 (13:43 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
tests/lib/Preview/GeneratorTest.php

index 50d46ae932ddeb5df231eea4c580203846b7c90d..f1383b0691b4e583a449d01b9f705d094b0cfbba 100644 (file)
@@ -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')