From: Artur Neumann Date: Mon, 9 Jan 2023 07:01:10 +0000 (+0545) Subject: move mocks into private variables X-Git-Tag: v27.0.0beta1~333^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F36033%2Fhead;p=nextcloud-server.git move mocks into private variables Signed-off-by: Artur Neumann --- 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 ); }