function Token::testTokenIntegration in Currency 8.3
Tests token integration.
File
- tests/
src/ Kernel/ Token.php, line 19  
Class
- Token
 - Token integration.
 
Namespace
Drupal\Tests\currency\KernelCode
function testTokenIntegration() {
  $this
    ->installConfig([
    'currency',
  ]);
  $token_service = \Drupal::token();
  $tokens = array(
    '[currency:code]' => 'XXX',
    '[currency:number]' => '999',
    '[currency:subunits]' => '0',
  );
  $data = array(
    'currency' => 'XXX',
  );
  foreach ($tokens as $token => $replacement) {
    $this
      ->assertEqual($token_service
      ->replace($token, $data), $replacement);
  }
}