public function UserProtectionTest::testPassProtection in User protect 8
Tests if the user's password field has the expected protection.
File
- tests/
src/ Functional/ UserProtectionTest.php, line 53
Class
- UserProtectionTest
- Tests each UserProtection plugin in action.
Namespace
Drupal\Tests\userprotect\FunctionalCode
public function testPassProtection() {
$protected_account = $this
->createProtectedUser([
'user_pass',
]);
$this
->drupalGet('user/' . $protected_account
->id() . '/edit');
$this
->assertSession()
->fieldNotExists('pass[pass1]');
$this
->assertSession()
->fieldNotExists('pass[pass2]');
}