diff -u b/core/modules/user/config/schema/user.schema.yml b/core/modules/user/config/schema/user.schema.yml --- b/core/modules/user/config/schema/user.schema.yml +++ b/core/modules/user/config/schema/user.schema.yml @@ -10,6 +10,9 @@ verify_mail: type: boolean label: 'Require email verification when a visitor creates an account' + register_password_set: + type: boolean + label: 'Require people to choose a password during registration.' notify: type: mapping label: 'Notify user' diff -u b/core/modules/user/tests/src/Functional/UserRegistrationTest.php b/core/modules/user/tests/src/Functional/UserRegistrationTest.php --- b/core/modules/user/tests/src/Functional/UserRegistrationTest.php +++ b/core/modules/user/tests/src/Functional/UserRegistrationTest.php @@ -201,7 +201,7 @@ $this->drupalGet('user/login'); $this->assertSession()->statusCodeEquals(200); $this->submitForm($edit2, 'Log in'); - $this->assertSession()->responseContains('The username ' . $name . ' has not been activated or is blocked.'); + $this->assertSession()->pageTextContains('The username ' . $name . ' has not been activated or is blocked.'); // Try to activate the user. $new_user->activate(); @@ -383,13 +383,13 @@ $this->drupalGet('user/register'); $this->assertSession()->statusCodeEquals(200); $this->submitForm($edit, 'Create new account'); - $this->assertSession()->responseContains("The username {$account->getAccountName()} is already taken."); + $this->assertSession()->pageTextContains("The username {$account->getAccountName()} is already taken."); $edit = ['mail' => $account->getEmail(), 'name' => $this->randomString()]; $this->drupalGet('user/register'); $this->assertSession()->statusCodeEquals(200); $this->submitForm($edit, 'Create new account'); - $this->assertSession()->responseContains("The email address {$account->getEmail()} is already taken."); + $this->assertSession()->pageTextContains("The email address {$account->getEmail()} is already taken."); } /** @@ -451,7 +451,7 @@ $edit['test_user_field[0][value]'] = '-1'; $this->submitForm($edit, 'Create new account'); $this->assertRegistrationFormCacheTagsWithUserFields(); - $this->assertSession()->responseContains("{$field->label()} does not accept the value -1."); + $this->assertSession()->pageTextContains("{$field->label()} does not accept the value -1."); // Submit with valid data. $value = rand(1, 255);