diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-05-02 21:49:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 21:49:14 +0200 |
commit | 24ff230f938bb9c47bbd75a133af84314b42aca7 (patch) | |
tree | 6919c65502964fea435abe070d0e544dae6e38dd /tests | |
parent | 34b8ea6ebf0cbe873804e1fb8d7d87859d3bb8e9 (diff) | |
parent | 2847e9f2e3e5f338ba1b727ea207b2c549d38e92 (diff) | |
download | nextcloud-server-24ff230f938bb9c47bbd75a133af84314b42aca7.tar.gz nextcloud-server-24ff230f938bb9c47bbd75a133af84314b42aca7.zip |
Merge pull request #4620 from nextcloud/preview-error-handling
better handling of preview generation errors
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Preview/GeneratorTest.php | 3 |
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') |