diff options
Diffstat (limited to 'tests/lib/App/AppManagerTest.php')
-rw-r--r-- | tests/lib/App/AppManagerTest.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index ba693999205..371c2373f81 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -19,6 +19,7 @@ use OCP\ICache; use OCP\ICacheFactory; use OCP\IGroup; use OCP\IGroupManager; +use OCP\ILogger; use OCP\IUser; use OCP\IUserSession; use OCP\IAppConfig; @@ -90,6 +91,9 @@ class AppManagerTest extends TestCase { /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $eventDispatcher; + /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + protected $logger; + /** @var IAppManager */ protected $manager; @@ -102,11 +106,12 @@ class AppManagerTest extends TestCase { $this->cacheFactory = $this->createMock(ICacheFactory::class); $this->cache = $this->createMock(ICache::class); $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); + $this->logger = $this->createMock(ILogger::class); $this->cacheFactory->expects($this->any()) ->method('createDistributed') ->with('settings') ->willReturn($this->cache); - $this->manager = new AppManager($this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher); + $this->manager = new AppManager($this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger); } protected function expectClearCache() { @@ -159,7 +164,7 @@ class AppManagerTest extends TestCase { /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) ->setConstructorArgs([ - $this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher + $this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger ]) ->setMethods([ 'getAppPath', @@ -206,7 +211,7 @@ class AppManagerTest extends TestCase { /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) ->setConstructorArgs([ - $this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher + $this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger ]) ->setMethods([ 'getAppPath', @@ -259,7 +264,7 @@ class AppManagerTest extends TestCase { /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) ->setConstructorArgs([ - $this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher + $this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger ]) ->setMethods([ 'getAppPath', @@ -418,7 +423,7 @@ class AppManagerTest extends TestCase { public function testGetAppsNeedingUpgrade() { /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) - ->setConstructorArgs([$this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher]) + ->setConstructorArgs([$this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger]) ->setMethods(['getAppInfo']) ->getMock(); @@ -466,7 +471,7 @@ class AppManagerTest extends TestCase { public function testGetIncompatibleApps() { /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) - ->setConstructorArgs([$this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher]) + ->setConstructorArgs([$this->userSession, $this->appConfig, $this->groupManager, $this->cacheFactory, $this->eventDispatcher, $this->logger]) ->setMethods(['getAppInfo']) ->getMock(); |