You are here

public function UserUpdateEmailToken::testEmailToken in Drupal 8

Tests that email token in status_blocked of user.mail is updated.

File

core/modules/user/tests/src/Functional/Update/UserUpdateEmailToken.php, line 28

Class

UserUpdateEmailToken
Tests user email token upgrade path.

Namespace

Drupal\Tests\user\Functional\Update

Code

public function testEmailToken() {
  $mail = \Drupal::config('user.mail')
    ->get('status_blocked');
  $this
    ->assertContains('[site:account-name]', $mail['body']);
  $this
    ->runUpdates();
  $mail = \Drupal::config('user.mail')
    ->get('status_blocked');
  $this
    ->assertNotContains('[site:account-name]', $mail['body']);
}