You are here

function TriggerActionTestCase::assertSystemMessageTokenReplacement in Drupal 7

Asserts correct token replacement for the given trigger and account.

Parameters

$trigger: A trigger like 'user_login'.

$account: The user account which triggered the action.

1 call to TriggerActionTestCase::assertSystemMessageTokenReplacement()
TriggerActionTestCase::assertSystemMessageAndEmailTokenReplacement in modules/trigger/trigger.test
Asserts correct token replacement in both system message and email.

File

modules/trigger/trigger.test, line 402
Tests for trigger.module.

Class

TriggerActionTestCase
Provides a base class with trigger assignments and test comparisons.

Code

function assertSystemMessageTokenReplacement($trigger, $account) {
  $expected = $this
    ->generateTokenExpandedComparison($trigger, $account);
  $this
    ->assertText($expected, format_string('Expected system message to contain token-replaced text "@expected" found in configured system message action', array(
    '@expected' => $expected,
  )));
}