$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
$expectedResponse = ['status' => 'error', 'msg' => ''];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordSuccessful() {
$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() {
'status' => 'error',
'msg' => 'Couldn\'t reset password because the token is expired',
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordInvalidDataInDb() {
'status' => 'error',
'msg' => 'Couldn\'t reset password because the token is expired',
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testIsSetPasswordWithoutTokenFailing() {
'status' => 'error',
'msg' => 'Couldn\'t reset password because the token is invalid'
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSetPasswordForDisabledUser() {
'status' => 'error',
'msg' => 'Couldn\'t reset password because the token is invalid'
];
- $this->assertSame($expectedResponse, $response);
+ $this->assertSame($expectedResponse, $response->getData());
}
public function testSendEmailNoEmail() {
}]]);
$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() {
$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() {