function SecureSiteFunctionUserSaveUnitTest::testSecureSiteFunctionUserSaveUpdatePassChanged in Secure Site 6.2
Same name and namespace in other branches
- 7.2 securesite.test \SecureSiteFunctionUserSaveUnitTest::testSecureSiteFunctionUserSaveUpdatePassChanged()
Update user name and password.
File
- ./
securesite.test, line 417 - Tests for Secure Site module.
Class
- SecureSiteFunctionUserSaveUnitTest
- Unit tests for user_save().
Code
function testSecureSiteFunctionUserSaveUpdatePassChanged() {
$user = user_save($this->user, array(
'name' => $this
->randomName(),
'pass' => user_password(),
));
$old = exec("{$this->stored_passwords} {$this->name_arg} {$this->pass_arg} {$this->realm_arg}");
$new = exec("{$this->stored_passwords} username=" . escapeshellarg($user->name) . " {$this->pass_arg} {$this->realm_arg}");
$this
->assertTrue($old == $this->user->name . " not found in {$this->realm}." && $new == "Updated {$user->name} in {$this->realm}.", t('Updating user name and password.'));
}