From dcab216f49b912c7731baa941b5045409187c648 Mon Sep 17 00:00:00 2001 From: Artur Neumann Date: Mon, 9 Jan 2023 12:46:10 +0545 Subject: [PATCH] move mocks into private variables Signed-off-by: Artur Neumann --- .../oauth2/tests/Controller/SettingsControllerTest.php | 10 ++++++++-- 1 file 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 ); } -- 2.39.5