]> source.dussan.org Git - nextcloud-server.git/commitdiff
move mocks into private variables
authorArtur Neumann <artur@jankaritech.com>
Mon, 9 Jan 2023 07:01:10 +0000 (12:46 +0545)
committerArtur Neumann <artur@jankaritech.com>
Fri, 19 May 2023 06:17:07 +0000 (12:02 +0545)
Signed-off-by: Artur Neumann <artur@jankaritech.com>
apps/oauth2/tests/Controller/SettingsControllerTest.php

index b11c59fd414920ff24153e5d4bb6d75eb674d2b2..e79d7cbe34ef1648bea27d430e1dd6f60ad3f8ef 100644 (file)
@@ -53,6 +53,10 @@ class SettingsControllerTest extends TestCase {
        private $secureRandom;
        /** @var AccessTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
        private $accessTokenMapper;
+       /** @var IAuthTokenProvider|\PHPUnit\Framework\MockObject\MockObject */
+       private $authTokenProvider;
+       /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
+       private $userManager;
        /** @var SettingsController */
        private $settingsController;
        /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
@@ -65,6 +69,8 @@ class SettingsControllerTest extends TestCase {
                $this->clientMapper = $this->createMock(ClientMapper::class);
                $this->secureRandom = $this->createMock(ISecureRandom::class);
                $this->accessTokenMapper = $this->createMock(AccessTokenMapper::class);
+               $this->authTokenProvider = $this->createMock(IAuthTokenProvider::class);
+               $this->userManager = $this->createMock(IUserManager::class);
                $this->l = $this->createMock(IL10N::class);
                $this->l->method('t')
                        ->willReturnArgument(0);
@@ -75,8 +81,8 @@ class SettingsControllerTest extends TestCase {
                        $this->secureRandom,
                        $this->accessTokenMapper,
                        $this->l,
-                       $this->createMock(IAuthTokenProvider::class),
-                       $this->createMock(IUserManager::class)
+                       $this->authTokenProvider,
+                       $this->userManager
                );
 
        }