private function _checkUserHasNotChanged($user, $newPassword, $newEmail = null, $newAlias = null)
{
if (is_null($newEmail)) {
$newEmail = $user['email'];
}
if (is_null($newAlias)) {
$newAlias = $user['alias'];
}
$userAfter = $this->api->getUser($user["login"]);
unset($userAfter['date_registered']);
// we now compute what the token auth should be, it should always be a hash of the login and the current password
// if the password has changed then the token_auth has changed!
$user['token_auth'] = $this->api->getTokenAuth($user["login"], md5($newPassword));
$user['password'] = md5($newPassword);
$user['email'] = $newEmail;
$user['alias'] = $newAlias;
$user['superuser_access'] = 0;
$this->assertEquals($user, $userAfter);
}