public function LoginSecurityEmailTest::testBlockedEmail in Login Security 2.x
Test that email is sent when users are blocked.
File
- tests/
src/ Functional/ LoginSecurityEmailTest.php, line 54
Class
- LoginSecurityEmailTest
- Test that emails are properly sent when configured.
Namespace
Drupal\Tests\login_security\FunctionalCode
public function testBlockedEmail() {
$variables = [
'@uid' => $this->account
->id(),
];
$form_state = new FormState();
login_user_block_user_name($variables, $form_state);
$this
->assertMail('to', 'test@test.com', 'Mail sent when a user is blocked.');
}