diff options
Diffstat (limited to 'apps/theming/tests/Controller/IconControllerTest.php')
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index 98fa4f1a243..69bbfa0e45e 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -28,6 +28,7 @@ use OCA\Theming\ImageManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataDisplayResponse; use OCP\Files\IRootFolder; +use OCP\Files\NotFoundException; use OCP\IConfig; use OCP\IL10N; use OCP\IRequest; @@ -131,6 +132,9 @@ class IconControllerTest extends TestCase { ->willReturn('filecontent'); $file = $this->iconFileMock('filename', 'filecontent'); $this->imageManager->expects($this->once()) + ->method('getCachedImage') + ->will($this->throwException(new NotFoundException())); + $this->imageManager->expects($this->once()) ->method('setCachedImage') ->willReturn($file); @@ -172,6 +176,9 @@ class IconControllerTest extends TestCase { ->willReturn('filecontent'); $file = $this->iconFileMock('filename', 'filecontent'); $this->imageManager->expects($this->once()) + ->method('getCachedImage') + ->will($this->throwException(new NotFoundException())); + $this->imageManager->expects($this->once()) ->method('setCachedImage') ->willReturn($file); |