You are here

public function TokenTest::testReplacePlain in Drupal 10

@covers ::replacePlain

File

core/tests/Drupal/Tests/Core/Utility/TokenTest.php, line 300

Class

TokenTest
@coversDefaultClass \Drupal\Core\Utility\Token @group Utility

Namespace

Drupal\Tests\Core\Utility

Code

public function testReplacePlain() {
  $this
    ->setupSiteTokens();
  $base = 'Wow, great "[site:name]" has a slogan "[site:slogan]"';
  $plain = $this->token
    ->replacePlain($base);
  $this
    ->assertEquals($plain, 'Wow, great "Your <best> buys" has a slogan "We are best"');
}