diff options
Diffstat (limited to 'apps/theming/tests/ImageManagerTest.php')
-rw-r--r-- | apps/theming/tests/ImageManagerTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index 0f03c565e91..7d61b80efdf 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -51,7 +51,7 @@ class ImageManagerTest extends TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->appData = $this->createMock(IAppData::class); @@ -184,10 +184,10 @@ class ImageManagerTest extends TestCase { $this->assertEquals($file, $this->imageManager->getImage('logo', false)); } - /** - * @expectedException OCP\Files\NotFoundException - */ + public function testGetImageUnset() { + $this->expectException(\OCP\Files\NotFoundException::class); + $this->config->expects($this->once()) ->method('getAppValue')->with('theming', 'logoMime', false) ->willReturn(false); @@ -239,10 +239,10 @@ class ImageManagerTest extends TestCase { $this->assertEquals($expected, $this->imageManager->getCachedImage('filename')); } - /** - * @expectedException \OCP\Files\NotFoundException - */ + public function testGetCachedImageNotFound() { + $this->expectException(\OCP\Files\NotFoundException::class); + $folder = $this->setupCacheFolder(); $folder->expects($this->once()) ->method('getFile') |