function TokenUnitTestCase::testTokenCaching in Token 6
Test token caching.
File
- ./token.test, line 226 
- Tests for the token module.
Class
Code
function testTokenCaching() {
  // Run global tokens once so that the cache is primed.
  $tokens = array(
    'option-foo' => '',
  );
  $this
    ->assertTokens('global', NULL, $tokens);
  // Run global tokens again with different options. This should return a
  // different value for the [option-foo] token.
  $tokens = array(
    'option-foo' => 'bar',
  );
  $this
    ->assertTokens('global', NULL, $tokens, array(
    'foo' => 'bar',
  ));
}