diff options
author | Artur Neumann <artur@jankaritech.com> | 2023-01-09 12:46:10 +0545 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-03-14 17:18:56 +0100 |
commit | e97540b9c61e736e9d541dffedd6064680418bc3 (patch) | |
tree | e8e77f4a8434b88cee64bbd89d7094a479121284 | |
parent | e9f5e796f01413ab70282adb3f1dc4593207ec58 (diff) | |
download | nextcloud-server-e97540b9c61e736e9d541dffedd6064680418bc3.tar.gz nextcloud-server-e97540b9c61e736e9d541dffedd6064680418bc3.zip |
move mocks into private variables
Signed-off-by: Artur Neumann <artur@jankaritech.com>
-rw-r--r-- | apps/oauth2/tests/Controller/SettingsControllerTest.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index b11c59fd414..e79d7cbe34e 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -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 ); } |