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