diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-13 22:54:08 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-13 22:54:08 +0200 |
commit | e4db293cc17acb855c9cd50f5ab9d5c840fe6dc2 (patch) | |
tree | c7a18c2ca0e2c546d5fc67fbf868b30b3b210d10 /apps/theming/tests/Controller/IconControllerTest.php | |
parent | cd87a40eb3a2b7026dfd1822e6e43e131edd3423 (diff) | |
download | nextcloud-server-e4db293cc17acb855c9cd50f5ab9d5c840fe6dc2.tar.gz nextcloud-server-e4db293cc17acb855c9cd50f5ab9d5c840fe6dc2.zip |
Fix possible test timing issues in IconController
Since the response now handles the caching. We need to provide a default
ITimeFactory mock. Else you might have failing tests.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/theming/tests/Controller/IconControllerTest.php')
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index f509005d32c..6d8ede159b3 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 |