You are here

public function CtoolsPageTokens::testSetVariableToken in Chaos Tool Suite (ctools) 7

Test that we can set page tokens.

File

tests/page_tokens.test, line 49
Tests for different parts of the ctools object caching system.

Class

CtoolsPageTokens
@file Tests for different parts of the ctools object caching system.

Code

public function testSetVariableToken() {
  $string = ctools_set_variable_token('title');
  $tokens = ctools_set_page_token();
  $this
    ->assertTrue(is_array($tokens) && count($tokens) === 1, 'Page tokens no longer empty');
  $this
    ->assertEqual($tokens[$string], array(
    'variable',
    'title',
  ), 'Page tokens no longer empty');
}