You are here

public function BirthdaysUtilityTestCase::testUpgradeTokens in Birthdays 7

Tests _birthdays_upgrade_tokens().

File

./birthdays.test, line 125
Unit tests for the Birthdays module.

Class

BirthdaysUtilityTestCase
Tests utility functions.

Code

public function testUpgradeTokens() {
  $this
    ->assertEqual(_birthdays_upgrade_tokens('Happy birthday !username!'), 'Happy birthday [user:name]!');
  $this
    ->assertEqual(_birthdays_upgrade_tokens('[site:name] !password'), '[site:name] !password');
  $this
    ->assertEqual(_birthdays_upgrade_tokens('!date !uri !mailto'), '[date:medium] [site:url] [user:mail]');
}