fix preview tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/4620/head
Robin Appelman 9 years ago
parent 23cc309606
commit 2847e9f2e3
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
  1. 3
      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')

Loading…
Cancel
Save