Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-04-16 10:41:54 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-04-16 10:47:52 +0300
commitb5ffca00f7c7132cc58dce97a6adf002efa564de (patch)
tree76021bb85f308b8840c5d4269cd44862cade2298 /tests
parent07278ed57d6997f34be35141ed5fa10dc6ee353a (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/Login/ALoginCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php1
-rw-r--r--tests/lib/Authentication/Login/CompleteLoginCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php6
-rw-r--r--tests/lib/Authentication/Login/EmailLoginCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/LoggedInCheckCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/PreLoginHookCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/TwoFactorCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/UidLoginCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php2
-rw-r--r--tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php2
-rw-r--r--tests/lib/Collaboration/Collaborators/LookupPluginTest.php8
14 files changed, 18 insertions, 19 deletions
diff --git a/tests/lib/Authentication/Login/ALoginCommandTest.php b/tests/lib/Authentication/Login/ALoginCommandTest.php
index 03cc7dfadc7..7c66e102704 100644
--- a/tests/lib/Authentication/Login/ALoginCommandTest.php
+++ b/tests/lib/Authentication/Login/ALoginCommandTest.php
@@ -22,7 +22,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\ALoginCommand;
use OC\Authentication\Login\LoginData;
diff --git a/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php b/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php
index 49c81b4f385..ded03cd95cd 100644
--- a/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php
+++ b/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php
@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace Test\Authentication\Login;
-use lib\Authentication\Login\ALoginCommandTest;
use OC\Authentication\Login\ClearLostPasswordTokensCommand;
use OCP\IConfig;
use PHPUnit\Framework\MockObject\MockObject;
diff --git a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php
index 7d6152f97a1..f90de10cdda 100644
--- a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php
+++ b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\CompleteLoginCommand;
use OC\User\Session;
diff --git a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php
index 9e49413e344..ef23e072c60 100644
--- a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php
+++ b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\CreateSessionTokenCommand;
use OC\Authentication\Token\IToken;
@@ -54,7 +54,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest {
public function testProcess() {
$data = $this->getLoggedInLoginData();
$this->config->expects($this->once())
- ->method('getSystemValue')
+ ->method('getSystemValueInt')
->with(
'remember_login_cookie_lifetime',
60 * 60 * 24 * 15
@@ -87,7 +87,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest {
public function testProcessDoNotRemember() {
$data = $this->getLoggedInLoginData();
$this->config->expects($this->once())
- ->method('getSystemValue')
+ ->method('getSystemValueInt')
->with(
'remember_login_cookie_lifetime',
60 * 60 * 24 * 15
diff --git a/tests/lib/Authentication/Login/EmailLoginCommandTest.php b/tests/lib/Authentication/Login/EmailLoginCommandTest.php
index 4c1f0bd0e5b..9de372148b9 100644
--- a/tests/lib/Authentication/Login/EmailLoginCommandTest.php
+++ b/tests/lib/Authentication/Login/EmailLoginCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\EmailLoginCommand;
use OCP\IUser;
diff --git a/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php b/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php
index 7b461219456..e24a3ca8f8d 100644
--- a/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php
+++ b/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\FinishRememberedLoginCommand;
use OC\User\Session;
diff --git a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php
index 4762c601bb8..afe486ab095 100644
--- a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php
+++ b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\LoggedInCheckCommand;
use OC\Core\Controller\LoginController;
diff --git a/tests/lib/Authentication/Login/PreLoginHookCommandTest.php b/tests/lib/Authentication/Login/PreLoginHookCommandTest.php
index 66822291ba8..d83717399d4 100644
--- a/tests/lib/Authentication/Login/PreLoginHookCommandTest.php
+++ b/tests/lib/Authentication/Login/PreLoginHookCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\PreLoginHookCommand;
use OC\User\Manager;
diff --git a/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php b/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php
index 88514fec237..8f7057e9d69 100644
--- a/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php
+++ b/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\SetUserTimezoneCommand;
use OCP\IConfig;
diff --git a/tests/lib/Authentication/Login/TwoFactorCommandTest.php b/tests/lib/Authentication/Login/TwoFactorCommandTest.php
index 4796aecad2e..fd37712c130 100644
--- a/tests/lib/Authentication/Login/TwoFactorCommandTest.php
+++ b/tests/lib/Authentication/Login/TwoFactorCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\TwoFactorCommand;
use OC\Authentication\TwoFactorAuth\Manager;
diff --git a/tests/lib/Authentication/Login/UidLoginCommandTest.php b/tests/lib/Authentication/Login/UidLoginCommandTest.php
index 6e22609631d..1f00ba77da4 100644
--- a/tests/lib/Authentication/Login/UidLoginCommandTest.php
+++ b/tests/lib/Authentication/Login/UidLoginCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\UidLoginCommand;
use OC\User\Manager;
diff --git a/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php b/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php
index 3db23d471ec..3ff82b38acc 100644
--- a/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php
+++ b/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\UpdateLastPasswordConfirmCommand;
use OCP\ISession;
diff --git a/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php b/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php
index 8c15ebe6c8f..65cfd0a71ac 100644
--- a/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php
+++ b/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php
@@ -23,7 +23,7 @@
declare(strict_types=1);
-namespace lib\Authentication\Login;
+namespace Test\Authentication\Login;
use OC\Authentication\Login\UserDisabledCheckCommand;
use OC\Core\Controller\LoginController;
diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
index 0a1febe33a5..81279c4c569 100644
--- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
@@ -97,7 +97,7 @@ class LookupPluginTest extends TestCase {
->willReturn(false);
$this->config->expects($this->at(2))
- ->method('getSystemValue')
+ ->method('getSystemValueBool')
->with('has_internet_connection', true)
->willReturn(true);
$this->config->expects($this->at(3))
@@ -125,7 +125,7 @@ class LookupPluginTest extends TestCase {
->willReturn(false);
$this->config->expects($this->at(2))
- ->method('getSystemValue')
+ ->method('getSystemValueBool')
->with('has_internet_connection', true)
->willReturn(false);
@@ -161,7 +161,7 @@ class LookupPluginTest extends TestCase {
->willReturn(false);
$this->config->expects($this->at(2))
- ->method('getSystemValue')
+ ->method('getSystemValueBool')
->with('has_internet_connection', true)
->willReturn(true);
$this->config->expects($this->at(3))
@@ -224,7 +224,7 @@ class LookupPluginTest extends TestCase {
->with($type, $searchParams['expectedResult'], []);
$this->config->expects($this->at(2))
- ->method('getSystemValue')
+ ->method('getSystemValueBool')
->with('has_internet_connection', true)
->willReturn(true);
$this->config->expects($this->at(3))