diff options
author | Julius Haertl <jus@bitgrid.net> | 2016-10-17 16:31:07 +0200 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2016-11-18 10:23:25 +0100 |
commit | 3a400f92d1936b2b752d813cbb27632d6acb9904 (patch) | |
tree | 3b9ab6f150ab8f54f457cb4eb0ec3a1e56a7049f /apps/theming/tests/Controller | |
parent | cc8b1d382910e13c0825e5a3fdb33276f65cf2bd (diff) | |
download | nextcloud-server-3a400f92d1936b2b752d813cbb27632d6acb9904.tar.gz nextcloud-server-3a400f92d1936b2b752d813cbb27632d6acb9904.zip |
Replace null return with NotFoundException
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/tests/Controller')
-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); |