Skip to content

Commit

Permalink
move mocks into private variables
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Neumann <artur@jankaritech.com>
  • Loading branch information
individual-it committed Jan 9, 2023
1 parent 9762ee8 commit b952807
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/oauth2/tests/Controller/SettingsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -65,6 +69,8 @@ protected function setUp(): void {
$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);
Expand All @@ -75,8 +81,8 @@ protected function setUp(): void {
$this->secureRandom,
$this->accessTokenMapper,
$this->l,
$this->createMock(IAuthTokenProvider::class),
$this->createMock(IUserManager::class)
$this->authTokenProvider,
$this->userManager
);

}
Expand Down

0 comments on commit b952807

Please sign in to comment.