function ConvertTokensTest::testConvertTokens

Same name in other branches
  1. 9 core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php \Drupal\Tests\user\Unit\Plugin\migrate\process\ConvertTokensTest::testConvertTokens()
  2. 8.9.x core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php \Drupal\Tests\user\Unit\Plugin\migrate\process\ConvertTokensTest::testConvertTokens()
  3. 10 core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php \Drupal\Tests\user\Unit\Plugin\migrate\process\ConvertTokensTest::testConvertTokens()

Tests conversion of user tokens.

File

core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php, line 28

Class

ConvertTokensTest
Tests the ConvertTokens plugin.

Namespace

Drupal\Tests\user\Unit\Plugin\migrate\process

Code

public function testConvertTokens() : void {
    $value = $this->plugin
        ->transform('Account details for !username at !site', $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertEquals('Account details for [user:name] at [site:name]', $value);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.