Fix unit test
* Fix namespace * Fix test Was broken after https://github.com/nextcloud/server/pull/26529 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
07278ed57d
commit
b5ffca00f7
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\ALoginCommand;
|
use OC\Authentication\Login\ALoginCommand;
|
||||||
use OC\Authentication\Login\LoginData;
|
use OC\Authentication\Login\LoginData;
|
||||||
|
|
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Test\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use lib\Authentication\Login\ALoginCommandTest;
|
|
||||||
use OC\Authentication\Login\ClearLostPasswordTokensCommand;
|
use OC\Authentication\Login\ClearLostPasswordTokensCommand;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\CompleteLoginCommand;
|
use OC\Authentication\Login\CompleteLoginCommand;
|
||||||
use OC\User\Session;
|
use OC\User\Session;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\CreateSessionTokenCommand;
|
use OC\Authentication\Login\CreateSessionTokenCommand;
|
||||||
use OC\Authentication\Token\IToken;
|
use OC\Authentication\Token\IToken;
|
||||||
|
@ -54,7 +54,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest {
|
||||||
public function testProcess() {
|
public function testProcess() {
|
||||||
$data = $this->getLoggedInLoginData();
|
$data = $this->getLoggedInLoginData();
|
||||||
$this->config->expects($this->once())
|
$this->config->expects($this->once())
|
||||||
->method('getSystemValue')
|
->method('getSystemValueInt')
|
||||||
->with(
|
->with(
|
||||||
'remember_login_cookie_lifetime',
|
'remember_login_cookie_lifetime',
|
||||||
60 * 60 * 24 * 15
|
60 * 60 * 24 * 15
|
||||||
|
@ -87,7 +87,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest {
|
||||||
public function testProcessDoNotRemember() {
|
public function testProcessDoNotRemember() {
|
||||||
$data = $this->getLoggedInLoginData();
|
$data = $this->getLoggedInLoginData();
|
||||||
$this->config->expects($this->once())
|
$this->config->expects($this->once())
|
||||||
->method('getSystemValue')
|
->method('getSystemValueInt')
|
||||||
->with(
|
->with(
|
||||||
'remember_login_cookie_lifetime',
|
'remember_login_cookie_lifetime',
|
||||||
60 * 60 * 24 * 15
|
60 * 60 * 24 * 15
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\EmailLoginCommand;
|
use OC\Authentication\Login\EmailLoginCommand;
|
||||||
use OCP\IUser;
|
use OCP\IUser;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\FinishRememberedLoginCommand;
|
use OC\Authentication\Login\FinishRememberedLoginCommand;
|
||||||
use OC\User\Session;
|
use OC\User\Session;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\LoggedInCheckCommand;
|
use OC\Authentication\Login\LoggedInCheckCommand;
|
||||||
use OC\Core\Controller\LoginController;
|
use OC\Core\Controller\LoginController;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\PreLoginHookCommand;
|
use OC\Authentication\Login\PreLoginHookCommand;
|
||||||
use OC\User\Manager;
|
use OC\User\Manager;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\SetUserTimezoneCommand;
|
use OC\Authentication\Login\SetUserTimezoneCommand;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\TwoFactorCommand;
|
use OC\Authentication\Login\TwoFactorCommand;
|
||||||
use OC\Authentication\TwoFactorAuth\Manager;
|
use OC\Authentication\TwoFactorAuth\Manager;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\UidLoginCommand;
|
use OC\Authentication\Login\UidLoginCommand;
|
||||||
use OC\User\Manager;
|
use OC\User\Manager;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\UpdateLastPasswordConfirmCommand;
|
use OC\Authentication\Login\UpdateLastPasswordConfirmCommand;
|
||||||
use OCP\ISession;
|
use OCP\ISession;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace lib\Authentication\Login;
|
namespace Test\Authentication\Login;
|
||||||
|
|
||||||
use OC\Authentication\Login\UserDisabledCheckCommand;
|
use OC\Authentication\Login\UserDisabledCheckCommand;
|
||||||
use OC\Core\Controller\LoginController;
|
use OC\Core\Controller\LoginController;
|
||||||
|
|
|
@ -97,7 +97,7 @@ class LookupPluginTest extends TestCase {
|
||||||
->willReturn(false);
|
->willReturn(false);
|
||||||
|
|
||||||
$this->config->expects($this->at(2))
|
$this->config->expects($this->at(2))
|
||||||
->method('getSystemValue')
|
->method('getSystemValueBool')
|
||||||
->with('has_internet_connection', true)
|
->with('has_internet_connection', true)
|
||||||
->willReturn(true);
|
->willReturn(true);
|
||||||
$this->config->expects($this->at(3))
|
$this->config->expects($this->at(3))
|
||||||
|
@ -125,7 +125,7 @@ class LookupPluginTest extends TestCase {
|
||||||
->willReturn(false);
|
->willReturn(false);
|
||||||
|
|
||||||
$this->config->expects($this->at(2))
|
$this->config->expects($this->at(2))
|
||||||
->method('getSystemValue')
|
->method('getSystemValueBool')
|
||||||
->with('has_internet_connection', true)
|
->with('has_internet_connection', true)
|
||||||
->willReturn(false);
|
->willReturn(false);
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class LookupPluginTest extends TestCase {
|
||||||
->willReturn(false);
|
->willReturn(false);
|
||||||
|
|
||||||
$this->config->expects($this->at(2))
|
$this->config->expects($this->at(2))
|
||||||
->method('getSystemValue')
|
->method('getSystemValueBool')
|
||||||
->with('has_internet_connection', true)
|
->with('has_internet_connection', true)
|
||||||
->willReturn(true);
|
->willReturn(true);
|
||||||
$this->config->expects($this->at(3))
|
$this->config->expects($this->at(3))
|
||||||
|
@ -224,7 +224,7 @@ class LookupPluginTest extends TestCase {
|
||||||
->with($type, $searchParams['expectedResult'], []);
|
->with($type, $searchParams['expectedResult'], []);
|
||||||
|
|
||||||
$this->config->expects($this->at(2))
|
$this->config->expects($this->at(2))
|
||||||
->method('getSystemValue')
|
->method('getSystemValueBool')
|
||||||
->with('has_internet_connection', true)
|
->with('has_internet_connection', true)
|
||||||
->willReturn(true);
|
->willReturn(true);
|
||||||
$this->config->expects($this->at(3))
|
$this->config->expects($this->at(3))
|
||||||
|
|
Loading…
Reference in New Issue