summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/tests')
-rw-r--r--apps/theming/tests/Controller/IconControllerTest.php6
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php12
2 files changed, 11 insertions, 7 deletions
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php
index cc83bae32a7..b4b45a065b0 100644
--- a/apps/theming/tests/Controller/IconControllerTest.php
+++ b/apps/theming/tests/Controller/IconControllerTest.php
@@ -64,19 +64,21 @@ class IconControllerTest extends TestCase {
public function setUp() {
$this->request = $this->createMock(IRequest::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
- $this->timeFactory = $this->createMock(ITimeFactory::class);
$this->iconBuilder = $this->createMock(IconBuilder::class);
$this->imageManager = $this->createMock(ImageManager::class);
$this->fileAccessHelper = $this->createMock(FileAccessHelper::class);
+
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
$this->timeFactory->expects($this->any())
->method('getTime')
->willReturn(123);
+ $this->overwriteService(ITimeFactory::class, $this->timeFactory);
+
$this->iconController = new IconController(
'theming',
$this->request,
$this->themingDefaults,
- $this->timeFactory,
$this->iconBuilder,
$this->imageManager,
$this->fileAccessHelper
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index aaed61016e4..360eb7083a4 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -86,26 +86,28 @@ class ThemingControllerTest extends TestCase {
$this->request = $this->createMock(IRequest::class);
$this->config = $this->createMock(IConfig::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
- $this->timeFactory = $this->createMock(ITimeFactory::class);
$this->l10n = $this->createMock(L10N::class);
$this->appData = $this->createMock(IAppData::class);
$this->appManager = $this->createMock(IAppManager::class);
$this->util = new Util($this->config, $this->appManager, $this->appData);
- $this->timeFactory->expects($this->any())
- ->method('getTime')
- ->willReturn(123);
$this->tempManager = \OC::$server->getTempManager();
$this->scssCacher = $this->createMock(SCSSCacher::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->imageManager = $this->createMock(ImageManager::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->timeFactory->expects($this->any())
+ ->method('getTime')
+ ->willReturn(123);
+
+ $this->overwriteService(ITimeFactory::class, $this->timeFactory);
+
$this->themingController = new ThemingController(
'theming',
$this->request,
$this->config,
$this->themingDefaults,
$this->util,
- $this->timeFactory,
$this->l10n,
$this->tempManager,
$this->appData,