mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-43481 lib: minor cleanups to commands
And remove unused strings - thanks to Simon Coggins!
This commit is contained in:
parent
6d0796942b
commit
25294dd466
2 changed files with 3 additions and 4 deletions
|
@ -2181,7 +2181,7 @@ class core_moodlelib_testcase extends advanced_testcase {
|
|||
* Test function validate_internal_user_password().
|
||||
*/
|
||||
public function test_validate_internal_user_password() {
|
||||
// Otherwise test bcrypt hashes.
|
||||
// Test bcrypt hashes.
|
||||
$validhashes = array(
|
||||
'pw' => '$2y$10$LOSDi5eaQJhutSRun.OVJ.ZSxQZabCMay7TO1KmzMkDMPvU40zGXK',
|
||||
'abc' => '$2y$10$VWTOhVdsBbWwtdWNDRHSpewjd3aXBQlBQf5rBY/hVhw8hciarFhXa',
|
||||
|
@ -2216,7 +2216,7 @@ class core_moodlelib_testcase extends advanced_testcase {
|
|||
$user->password = $hash;
|
||||
$this->assertTrue(validate_internal_user_password($user, $password));
|
||||
|
||||
// Otherwise they should not be in md5 format.
|
||||
// They should not be in md5 format.
|
||||
$this->assertFalse(password_is_legacy_hash($hash));
|
||||
|
||||
// Check that cost factor in hash is correctly set.
|
||||
|
@ -2249,7 +2249,7 @@ class core_moodlelib_testcase extends advanced_testcase {
|
|||
// Update the password.
|
||||
update_internal_user_password($user, 'password');
|
||||
|
||||
// Otherwise password should have been updated to a bcrypt hash.
|
||||
// Password should have been updated to a bcrypt hash.
|
||||
$this->assertFalse(password_is_legacy_hash($user->password));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue