Browse Source

Merge pull request #26583 from nextcloud/fix/unit-test

Fix unit test
tags/v22.0.0beta1
Roeland Jago Douma 3 years ago
parent
commit
657ee534a8
No account linked to committer's email address

+ 1
- 1
tests/lib/Authentication/Login/ALoginCommandTest.php View File

@@ -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;

+ 0
- 1
tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php View File

@@ -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;

+ 1
- 1
tests/lib/Authentication/Login/CompleteLoginCommandTest.php View File

@@ -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;

+ 3
- 3
tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php View File

@@ -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

+ 1
- 1
tests/lib/Authentication/Login/EmailLoginCommandTest.php View File

@@ -23,7 +23,7 @@

declare(strict_types=1);

namespace lib\Authentication\Login;
namespace Test\Authentication\Login;

use OC\Authentication\Login\EmailLoginCommand;
use OCP\IUser;

+ 1
- 1
tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php View File

@@ -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;

+ 1
- 1
tests/lib/Authentication/Login/LoggedInCheckCommandTest.php View File

@@ -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;

+ 1
- 1
tests/lib/Authentication/Login/PreLoginHookCommandTest.php View File

@@ -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;

+ 1
- 1
tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php View File

@@ -23,7 +23,7 @@

declare(strict_types=1);

namespace lib\Authentication\Login;
namespace Test\Authentication\Login;

use OC\Authentication\Login\SetUserTimezoneCommand;
use OCP\IConfig;

+ 1
- 1
tests/lib/Authentication/Login/TwoFactorCommandTest.php View File

@@ -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;

+ 1
- 1
tests/lib/Authentication/Login/UidLoginCommandTest.php View File

@@ -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;

+ 1
- 1
tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php View File

@@ -23,7 +23,7 @@

declare(strict_types=1);

namespace lib\Authentication\Login;
namespace Test\Authentication\Login;

use OC\Authentication\Login\UpdateLastPasswordConfirmCommand;
use OCP\ISession;

+ 1
- 1
tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php View File

@@ -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;

+ 4
- 4
tests/lib/Collaboration/Collaborators/LookupPluginTest.php View File

@@ -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))

Loading…
Cancel
Save