summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-05-15 16:12:14 +0200
committerJoas Schilling <coding@schilljs.com>2023-05-15 16:14:15 +0200
commit156cc8d16bf90cc5e7828921ca72a9e9b4056ce0 (patch)
tree3b2741746ed434b4d4c7877914a4e5285973e1e6 /tests
parente4b987142c9b1a562460ee1ed3cc75613a3d5a9e (diff)
downloadnextcloud-server-156cc8d16bf90cc5e7828921ca72a9e9b4056ce0.tar.gz
nextcloud-server-156cc8d16bf90cc5e7828921ca72a9e9b4056ce0.zip
fix(tests): Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LostControllerTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index e95c3fa1c51..15237810eaf 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -447,7 +447,7 @@ class LostControllerTest extends TestCase {
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
$expectedResponse = ['status' => 'error', 'msg' => ''];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordSuccessful() {
@@ -475,7 +475,7 @@ class LostControllerTest extends TestCase {
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
$expectedResponse = ['user' => 'ValidTokenUser', 'status' => 'success'];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordExpiredToken() {
@@ -494,7 +494,7 @@ class LostControllerTest extends TestCase {
'status' => 'error',
'msg' => 'Could not reset password because the token is expired',
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordInvalidDataInDb() {
@@ -514,7 +514,7 @@ class LostControllerTest extends TestCase {
'status' => 'error',
'msg' => 'Could not reset password because the token is invalid',
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testIsSetPasswordWithoutTokenFailing() {
@@ -533,7 +533,7 @@ class LostControllerTest extends TestCase {
'status' => 'error',
'msg' => 'Could not reset password because the token is invalid'
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordForDisabledUser() {
@@ -563,7 +563,7 @@ class LostControllerTest extends TestCase {
'status' => 'error',
'msg' => 'Could not reset password because the token is invalid'
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSendEmailNoEmail() {
@@ -599,7 +599,7 @@ class LostControllerTest extends TestCase {
}]]);
$response = $this->lostController->setPassword('myToken', 'user', 'newpass', false);
$expectedResponse = ['status' => 'error', 'msg' => '', 'encryption' => true];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordDontProceedMasterKey() {
@@ -627,7 +627,7 @@ class LostControllerTest extends TestCase {
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', false);
$expectedResponse = ['user' => 'ValidTokenUser', 'status' => 'success'];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testTwoUsersWithSameEmail() {