Skip to content

Commit

Permalink
Fixed the SecurityTest error
Browse files Browse the repository at this point in the history
Signed-off-by: Greta Doci <[email protected]>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
GretaD authored and npmbuildbot[bot] committed Sep 14, 2019
1 parent ee02bd6 commit 84beca9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 6 additions & 1 deletion settings/Settings/Personal/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@

class Security implements ISettings {

/** @var IInitialStateService */
private $initialStateService;

/** @var IUserManager */
private $userManager;

Expand All @@ -61,11 +64,13 @@ class Security implements ISettings {
/** @var IConfig */
private $config;

public function __construct(IUserManager $userManager,
public function __construct(IInitialStateService $initialStateService,
IUserManager $userManager,
ProviderLoader $providerLoader,
IUserSession $userSession,
IConfig $config,
?string $UserId) {
$this->initialStateService = $initialStateService;
$this->userManager = $userManager;
$this->providerLoader = $providerLoader;
$this->userSession = $userSession;
Expand Down
6 changes: 3 additions & 3 deletions settings/js/vue-settings-personal-security.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-settings-personal-security.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions tests/lib/Settings/Personal/SecurityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
namespace Test\Settings\Personal;

use OC\Authentication\TwoFactorAuth\ProviderLoader;
use OCP\IInitialStateService;
use OCP\InitialStateService;
use OC\Settings\Personal\Security;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
Expand All @@ -36,6 +38,9 @@

class SecurityTest extends TestCase {

/** @var InitialStateService|MockObject */
private $initialStateService;

/** @var IUserManager|MockObject */
private $userManager;

Expand All @@ -57,13 +62,15 @@ class SecurityTest extends TestCase {
public function setUp() {
parent::setUp();

$this->initialStateService = $this->createMock(IInitialStateService::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->providerLoader = $this->createMock(ProviderLoader::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->config = $this->createMock(IConfig::class);
$this->uid = 'test123';

$this->section = new Security(
$this->initialStateService,
$this->userManager,
$this->providerLoader,
$this->userSession,
Expand Down

0 comments on commit 84beca9

Please sign in to comment.