From 094d41937a5889e4c545ecf575aa1acbcf489a55 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 18 Dec 2017 21:06:52 +0100 Subject: [PATCH] Fix tests Signed-off-by: Roeland Jago Douma --- apps/theming/tests/ThemingDefaultsTest.php | 2 +- tests/Core/Command/Maintenance/UpdateTheme.php | 2 +- tests/lib/App/AppManagerTest.php | 2 +- tests/lib/IntegrityCheck/CheckerTest.php | 2 +- tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 52bf88e51dd9c..843c1d34f9e0f 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -78,7 +78,7 @@ public function setUp() { $this->defaults = new \OC_Defaults(); $this->cacheFactory ->expects($this->any()) - ->method('create') + ->method('createDistributed') ->with('theming') ->willReturn($this->cache); $this->template = new ThemingDefaults( diff --git a/tests/Core/Command/Maintenance/UpdateTheme.php b/tests/Core/Command/Maintenance/UpdateTheme.php index fbdea0b72b492..cbc417dbdbaa9 100644 --- a/tests/Core/Command/Maintenance/UpdateTheme.php +++ b/tests/Core/Command/Maintenance/UpdateTheme.php @@ -74,7 +74,7 @@ public function testThemeUpdate() { ->method('clear') ->with(''); $this->cacheFactory->expects($this->once()) - ->method('create') + ->method('createDistributed') ->with('imagePath') ->willReturn($cache); self::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]); diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index c2c0ea55072fd..c361db7b76b21 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -100,7 +100,7 @@ protected function setUp() { $this->cache = $this->createMock(ICache::class); $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); $this->cacheFactory->expects($this->any()) - ->method('create') + ->method('createDistributed') ->with('settings') ->willReturn($this->cache); $this->manager = new AppManager($this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher); diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index 049017cb5e88e..09e6990a0f386 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -60,7 +60,7 @@ public function setUp() { $this->cacheFactory ->expects($this->any()) - ->method('create') + ->method('createDistributed') ->with('oc.integritycheck.checker') ->will($this->returnValue(new NullCache())); diff --git a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php index 34c326e72e118..bacd2b7bf6fb9 100644 --- a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php +++ b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php @@ -46,7 +46,7 @@ public function setUp() { $this->cacheFactory ->expects($this->once()) - ->method('create') + ->method('createDistributed') ->with('OC\Security\RateLimiting\Backend\MemoryCache') ->willReturn($this->cache);