diff options
author | Daniel <mail@danielkesselberg.de> | 2023-06-26 13:53:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 13:53:27 +0200 |
commit | 9751303182069e510e67015ba81c0cd224b4a483 (patch) | |
tree | 840c57ecab74117198c1e13ad4b5218ad46fe157 /tests | |
parent | 783f1b9a2a0cf868fcbe440f3d8fb19e7f175172 (diff) | |
parent | 440f882322562af6040c0c4634903574f572f146 (diff) | |
download | nextcloud-server-9751303182069e510e67015ba81c0cd224b4a483.tar.gz nextcloud-server-9751303182069e510e67015ba81c0cd224b4a483.zip |
Merge pull request #38679 from nextcloud/feat/add-spec-to-preview-fetched-event
feat: add width, height, crop and mode to BeforePreviewFetchedEvent
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Preview/GeneratorTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index 37fc3935139..2216674a34c 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -125,7 +125,7 @@ class GeneratorTest extends \Test\TestCase { $this->eventDispatcher->expects($this->once()) ->method('dispatchTyped') - ->with(new BeforePreviewFetchedEvent($file)); + ->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL)); $result = $this->generator->getPreview($file, 100, 100); $this->assertSame($previewFile, $result); @@ -264,7 +264,7 @@ class GeneratorTest extends \Test\TestCase { $this->eventDispatcher->expects($this->once()) ->method('dispatchTyped') - ->with(new BeforePreviewFetchedEvent($file)); + ->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL)); $result = $this->generator->getPreview($file, 100, 100); $this->assertSame($previewFile, $result); @@ -316,7 +316,7 @@ class GeneratorTest extends \Test\TestCase { $this->eventDispatcher->expects($this->once()) ->method('dispatchTyped') - ->with(new BeforePreviewFetchedEvent($file)); + ->with(new BeforePreviewFetchedEvent($file, 1024, 512, true, IPreview::MODE_COVER)); $this->generator->getPreview($file, 1024, 512, true, IPreview::MODE_COVER, 'invalidType'); } @@ -366,7 +366,7 @@ class GeneratorTest extends \Test\TestCase { $this->eventDispatcher->expects($this->once()) ->method('dispatchTyped') - ->with(new BeforePreviewFetchedEvent($file)); + ->with(new BeforePreviewFetchedEvent($file, 1024, 512, true, IPreview::MODE_COVER)); $result = $this->generator->getPreview($file, 1024, 512, true, IPreview::MODE_COVER, 'invalidType'); $this->assertSame($preview, $result); @@ -405,7 +405,7 @@ class GeneratorTest extends \Test\TestCase { $this->eventDispatcher->expects($this->once()) ->method('dispatchTyped') - ->with(new BeforePreviewFetchedEvent($file)); + ->with(new BeforePreviewFetchedEvent($file, 100, 100, false, IPreview::MODE_FILL)); $this->expectException(NotFoundException::class); $this->generator->getPreview($file, 100, 100); @@ -543,7 +543,7 @@ class GeneratorTest extends \Test\TestCase { $this->eventDispatcher->expects($this->once()) ->method('dispatchTyped') - ->with(new BeforePreviewFetchedEvent($file)); + ->with(new BeforePreviewFetchedEvent($file, $reqX, $reqY, $crop, $mode)); $result = $this->generator->getPreview($file, $reqX, $reqY, $crop, $mode); if ($expectedX === $maxX && $expectedY === $maxY) { |