$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) {
->with(128);
$image->method('data')
->willReturn('my resized data');
+ $image->method('valid')->willReturn(true);
$previewFile->expects($this->once())
->method('putContent')
->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')