diff options
author | Elijah Martin-Merrill <elijah@nyp-itsours.com> | 2020-07-27 17:52:44 +0300 |
---|---|---|
committer | Elijah Martin-Merrill <elijah@nyp-itsours.com> | 2020-07-27 17:52:44 +0300 |
commit | 56ed563b0c02834c1b3fffb839da25a2918ec7e8 (patch) | |
tree | 37f7a9af104e5edcb4aefe835599f620cdf77a1d /tests/lib | |
parent | 4cac0f6895cf4bda4dda0b7cb3b843546eb0a952 (diff) |
fix memory leak caused by not destroying image in Preview/Generate.php
Signed-off-by: Elijah Martin-Merrill <elijah@nyp-itsours.com>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Preview/GeneratorTest.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index 3a46447632d..5e9b9bcbb8d 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -31,7 +31,6 @@ use OCP\Files\NotFoundException; use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; use OCP\IConfig; -use OCP\IImage; use OCP\IPreview; use OCP\Preview\IProviderV2; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -183,7 +182,7 @@ class GeneratorTest extends \Test\TestCase { $this->fail('Unexpected provider requested'); }); - $image = $this->createMock(IImage::class); + $image = $this->createMock(\OC_Image::class); $image->method('width')->willReturn(2048); $image->method('height')->willReturn(2048); $image->method('valid')->willReturn(true); @@ -318,7 +317,7 @@ class GeneratorTest extends \Test\TestCase { } private function getMockImage($width, $height, $data = null) { - $image = $this->createMock(IImage::class); + $image = $this->createMock(\OC_Image::class); $image->method('height')->willReturn($width); $image->method('width')->willReturn($height); $image->method('valid')->willReturn(true); |