UserUpdateEmailToken.php
Namespace
Drupal\Tests\user\Functional\UpdateFile
-
core/
modules/ user/ tests/ src/ Functional/ Update/ UserUpdateEmailToken.php
View source
<?php
namespace Drupal\Tests\user\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Tests user email token upgrade path.
*
* @group Update
* @group legacy
*/
class UserUpdateEmailToken extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../fixtures/update/drupal-8.user-email-token-2587275.php',
];
}
/**
* Tests that email token in status_blocked of user.mail is updated.
*/
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']);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
UserUpdateEmailToken | Tests user email token upgrade path. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.