Update Drupal 7 dependencies

This commit is contained in:
Mauricio Dinarte 2025-06-03 10:37:00 -06:00 committed by Janez Urevc
parent 7d902ba1ef
commit 13df912654
391 changed files with 2900 additions and 1502 deletions

View file

@ -144,10 +144,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
variable_set('configurable_timezones', 1);
variable_set('date_default_timezone', 'Europe/Brussels');
// Check that the account information fieldset's options are not displayed
// is a fieldset if there is not more than one fieldset in the form.
$this->drupalGet('user/register');
$this->assertNoRaw('<fieldset id="edit-account"><legend>Account information</legend>', 'Account settings fieldset was hidden.');
$edit = array();
$edit['name'] = $name = $this->randomName();
@ -2343,6 +2340,42 @@ class UserEditTestCase extends DrupalWebTestCase {
$this->drupalLogin($user1);
$this->drupalLogout();
}
/**
* Tests that the user can edit the account when another user with the same
* e-mail address exists.
*/
public function testUserEditDuplicateEmail() {
// Create two regular users.
$user1 = $this->drupalCreateUser(array('change own username'));
$user2 = $this->drupalCreateUser(array('change own username'));
// Change the e-mail address of the user2 to have the same e-mail address
// as the user1.
db_update('users')
->fields(array('mail' => $user1->mail))
->condition('uid', $user2->uid)
->execute();
$this->drupalLogin($user2);
$edit['name'] = $user2->name;
$this->drupalPost("user/" . $user2->uid . "/edit", $edit, t('Save'));
$this->assertRaw(t("The changes have been saved."));
$this->drupalLogout();
// Change the e-mail address of the user2 to have the same e-mail address
// as the user1, except that the first letter will be uppercase.
db_update('users')
->fields(array('mail' => ucfirst($user1->mail)))
->condition('uid', $user2->uid)
->execute();
$this->drupalLogin($user2);
$edit['name'] = $user2->name;
$this->drupalPost("user/" . $user2->uid . "/edit", $edit, t('Save'));
$this->assertRaw(t("The changes have been saved."));
$this->drupalLogout();
}
}
/**