Fixed the SecurityTest error
Signed-off-by: Greta Doci <gretadoci@gmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
parent
4ff7551574
commit
68ef242a0a
|
@ -46,6 +46,9 @@ use OCP\IConfig;
|
||||||
|
|
||||||
class Security implements ISettings {
|
class Security implements ISettings {
|
||||||
|
|
||||||
|
/** @var IInitialStateService */
|
||||||
|
private $initialStateService;
|
||||||
|
|
||||||
/** @var IUserManager */
|
/** @var IUserManager */
|
||||||
private $userManager;
|
private $userManager;
|
||||||
|
|
||||||
|
@ -61,11 +64,13 @@ class Security implements ISettings {
|
||||||
/** @var IConfig */
|
/** @var IConfig */
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
public function __construct(IUserManager $userManager,
|
public function __construct(IInitialStateService $initialStateService,
|
||||||
|
IUserManager $userManager,
|
||||||
ProviderLoader $providerLoader,
|
ProviderLoader $providerLoader,
|
||||||
IUserSession $userSession,
|
IUserSession $userSession,
|
||||||
IConfig $config,
|
IConfig $config,
|
||||||
?string $UserId) {
|
?string $UserId) {
|
||||||
|
$this->initialStateService = $initialStateService;
|
||||||
$this->userManager = $userManager;
|
$this->userManager = $userManager;
|
||||||
$this->providerLoader = $providerLoader;
|
$this->providerLoader = $providerLoader;
|
||||||
$this->userSession = $userSession;
|
$this->userSession = $userSession;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -25,6 +25,8 @@ declare(strict_types=1);
|
||||||
namespace Test\Settings\Personal;
|
namespace Test\Settings\Personal;
|
||||||
|
|
||||||
use OC\Authentication\TwoFactorAuth\ProviderLoader;
|
use OC\Authentication\TwoFactorAuth\ProviderLoader;
|
||||||
|
use OCP\IInitialStateService;
|
||||||
|
use OCP\InitialStateService;
|
||||||
use OC\Settings\Personal\Security;
|
use OC\Settings\Personal\Security;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
|
@ -36,6 +38,9 @@ use Test\TestCase;
|
||||||
|
|
||||||
class SecurityTest extends TestCase {
|
class SecurityTest extends TestCase {
|
||||||
|
|
||||||
|
/** @var InitialStateService|MockObject */
|
||||||
|
private $initialStateService;
|
||||||
|
|
||||||
/** @var IUserManager|MockObject */
|
/** @var IUserManager|MockObject */
|
||||||
private $userManager;
|
private $userManager;
|
||||||
|
|
||||||
|
@ -57,6 +62,7 @@ class SecurityTest extends TestCase {
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->initialStateService = $this->createMock(IInitialStateService::class);
|
||||||
$this->userManager = $this->createMock(IUserManager::class);
|
$this->userManager = $this->createMock(IUserManager::class);
|
||||||
$this->providerLoader = $this->createMock(ProviderLoader::class);
|
$this->providerLoader = $this->createMock(ProviderLoader::class);
|
||||||
$this->userSession = $this->createMock(IUserSession::class);
|
$this->userSession = $this->createMock(IUserSession::class);
|
||||||
|
@ -64,6 +70,7 @@ class SecurityTest extends TestCase {
|
||||||
$this->uid = 'test123';
|
$this->uid = 'test123';
|
||||||
|
|
||||||
$this->section = new Security(
|
$this->section = new Security(
|
||||||
|
$this->initialStateService,
|
||||||
$this->userManager,
|
$this->userManager,
|
||||||
$this->providerLoader,
|
$this->providerLoader,
|
||||||
$this->userSession,
|
$this->userSession,
|
||||||
|
|
Loading…
Reference in New Issue