public function LoginSecurityEmailTest::testBlockedEmail in Login Security 8
Test that email is sent when users are blocked.
File
- src/
Tests/ LoginSecurityEmailTest.php, line 50
Class
- LoginSecurityEmailTest
- Test that emails are properly sent when configured.
Namespace
Drupal\login_security\TestsCode
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.');
}