diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-05-14 14:28:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 14:28:55 +0200 |
commit | 0dcb6b267524b645d3e058b935bf8f6b31bf1f56 (patch) | |
tree | f3e8a3826792e29f2fe2cefa8d61462521da7528 /apps | |
parent | d2cc48c6dd07712b35b011e08223718d1fd5ec7d (diff) | |
parent | 0dffd07a60d5c928a0f380e6c072b424bf0184c0 (diff) | |
download | nextcloud-server-0dcb6b267524b645d3e058b935bf8f6b31bf1f56.tar.gz nextcloud-server-0dcb6b267524b645d3e058b935bf8f6b31bf1f56.zip |
Merge pull request #9420 from nextcloud/feature/5263/cleanup_previes
Cleanup previews in the background
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/tests/IconBuilderTest.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index a2a330a2f24..1b9f204cd9e 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -25,13 +25,11 @@ */ namespace OCA\Theming\Tests; +use OC\Files\AppData\AppData; use OCA\Theming\IconBuilder; use OCA\Theming\ThemingDefaults; use OCA\Theming\Util; use OCP\App\IAppManager; -use OCP\AppFramework\Http\NotFoundResponse; -use OCP\Files\IAppData; -use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\IConfig; use PHPUnit\Framework\Error\Warning; @@ -41,7 +39,7 @@ class IconBuilderTest extends TestCase { /** @var IConfig */ protected $config; - /** @var IAppData */ + /** @var AppData */ protected $appData; /** @var ThemingDefaults */ protected $themingDefaults; @@ -56,7 +54,7 @@ class IconBuilderTest extends TestCase { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); - $this->appData = $this->createMock(IAppData::class); + $this->appData = $this->createMock(AppData::class); $this->themingDefaults = $this->getMockBuilder('OCA\Theming\ThemingDefaults') ->disableOriginalConstructor()->getMock(); $this->appManager = $this->getMockBuilder('OCP\App\IAppManager')->getMock(); @@ -127,6 +125,10 @@ class IconBuilderTest extends TestCase { $this->themingDefaults->expects($this->once()) ->method('getColorPrimary') ->willReturn($color); + $this->appData->expects($this->once()) + ->method('getFolder') + ->with('images') + ->willThrowException(new NotFoundException()); $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file); $icon = new \Imagick(); @@ -156,6 +158,10 @@ class IconBuilderTest extends TestCase { $this->themingDefaults->expects($this->once()) ->method('getColorPrimary') ->willReturn($color); + $this->appData->expects($this->once()) + ->method('getFolder') + ->with('images') + ->willThrowException(new NotFoundException()); $expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file); $actualIcon = $this->iconBuilder->getFavicon($app); |