Pull merge.
[yaffs-website] / web / core / modules / user / tests / src / Functional / Update / UserUpdateEmailToken.php
1 <?php
2
3 namespace Drupal\Tests\user\Functional\Update;
4
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6
7 /**
8  * Tests user email token upgrade path.
9  *
10  * @group Update
11  * @group legacy
12  */
13 class UserUpdateEmailToken extends UpdatePathTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   protected function setDatabaseDumpFiles() {
19     $this->databaseDumpFiles = [
20       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
21       __DIR__ . '/../../../fixtures/update/drupal-8.user-email-token-2587275.php',
22     ];
23   }
24
25   /**
26    * Tests that email token in status_blocked of user.mail is updated.
27    */
28   public function testEmailToken() {
29     $mail = \Drupal::config('user.mail')->get('status_blocked');
30     $this->assertTrue(strpos($mail['body'], '[site:account-name]'));
31     $this->runUpdates();
32     $mail = \Drupal::config('user.mail')->get('status_blocked');
33     $this->assertFalse(strpos($mail['body'], '[site:account-name]'));
34   }
35
36 }