diff options
Diffstat (limited to 'apps/theming/tests/UtilTest.php')
-rw-r--r-- | apps/theming/tests/UtilTest.php | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php index 10013e7d61c..d6fe318cbca 100644 --- a/apps/theming/tests/UtilTest.php +++ b/apps/theming/tests/UtilTest.php @@ -216,32 +216,19 @@ class UtilTest extends TestCase { public function dataIsBackgroundThemed() { return [ - [false, false, false], - ['png', true, true], - ['backgroundColor', false, false], + ['', false], + ['png', true], + ['backgroundColor', false], ]; } /** * @dataProvider dataIsBackgroundThemed */ - public function testIsBackgroundThemed($backgroundMime, $fileFound, $expected) { + public function testIsBackgroundThemed($backgroundMime, $expected) { $this->config->expects($this->once()) ->method('getAppValue') - ->with('theming', 'backgroundMime', false) + ->with('theming', 'backgroundMime', '') ->willReturn($backgroundMime); - $folder = $this->createMock(ISimpleFolder::class); - if ($fileFound) { - $folder->expects($this->once()) - ->method('getFile') - ->willReturn($this->createMock(ISimpleFile::class)); - } else { - $folder->expects($this->once()) - ->method('getFile') - ->willThrowException(new NotFoundException()); - } - $this->appData->expects($this->once()) - ->method('getFolder') - ->willReturn($folder); $this->assertEquals($expected, $this->util->isBackgroundThemed()); } } |