|  |  | @ -91,7 +91,7 @@ class GeneratorTest extends \Test\TestCase { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->eventDispatcher->expects($this->once()) | 
			
		
	
		
			
				
					|  |  |  | 			->method('dispatchTyped') | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL)); | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL, null)); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$result = $this->generator->getPreview($file, 100, 100); | 
			
		
	
		
			
				
					|  |  |  | 		$this->assertSame($previewFile, $result); | 
			
		
	
	
		
			
				
					|  |  | @ -219,7 +219,7 @@ class GeneratorTest extends \Test\TestCase { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->eventDispatcher->expects($this->once()) | 
			
		
	
		
			
				
					|  |  |  | 			->method('dispatchTyped') | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL)); | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL, null)); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$result = $this->generator->getPreview($file, 100, 100); | 
			
		
	
		
			
				
					|  |  |  | 		$this->assertSame($previewFile, $result); | 
			
		
	
	
		
			
				
					|  |  | @ -258,7 +258,7 @@ class GeneratorTest extends \Test\TestCase { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->eventDispatcher->expects($this->once()) | 
			
		
	
		
			
				
					|  |  |  | 			->method('dispatchTyped') | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 1024, 512, true, IPreview::MODE_COVER)); | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 1024, 512, true, IPreview::MODE_COVER, 'invalidType')); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->generator->getPreview($file, 1024, 512, true, IPreview::MODE_COVER, 'invalidType'); | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
	
		
			
				
					|  |  | @ -295,7 +295,7 @@ class GeneratorTest extends \Test\TestCase { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->eventDispatcher->expects($this->once()) | 
			
		
	
		
			
				
					|  |  |  | 			->method('dispatchTyped') | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 1024, 512, true, IPreview::MODE_COVER)); | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 1024, 512, true, IPreview::MODE_COVER, 'invalidType')); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$result = $this->generator->getPreview($file, 1024, 512, true, IPreview::MODE_COVER, 'invalidType'); | 
			
		
	
		
			
				
					|  |  |  | 		$this->assertSame($preview, $result); | 
			
		
	
	
		
			
				
					|  |  | @ -323,7 +323,7 @@ class GeneratorTest extends \Test\TestCase { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->eventDispatcher->expects($this->once()) | 
			
		
	
		
			
				
					|  |  |  | 			->method('dispatchTyped') | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL)); | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL, null)); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->expectException(NotFoundException::class); | 
			
		
	
		
			
				
					|  |  |  | 		$this->generator->getPreview($file, 100, 100); | 
			
		
	
	
		
			
				
					|  |  | @ -448,7 +448,7 @@ class GeneratorTest extends \Test\TestCase { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$this->eventDispatcher->expects($this->once()) | 
			
		
	
		
			
				
					|  |  |  | 			->method('dispatchTyped') | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, $reqX, $reqY, $crop, $mode)); | 
			
		
	
		
			
				
					|  |  |  | 			->with(new BeforePreviewFetchedEvent($file, $reqX, $reqY, $crop, $mode, null)); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		$result = $this->generator->getPreview($file, $reqX, $reqY, $crop, $mode); | 
			
		
	
		
			
				
					|  |  |  | 		if ($expectedX === $maxX && $expectedY === $maxY) { | 
			
		
	
	
		
			
				
					|  |  | 
 |