You are here

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

Test that we can set page tokens.

File

tests/page_tokens.test, line 38
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 testSetPageToken() {
  ctools_set_page_token('id', 'variable', 'test');
  $tokens = ctools_set_page_token();
  $this
    ->assertTrue(is_array($tokens) && count($tokens) === 1, 'Page tokens no longer empty.');
  $this
    ->assertEqual($tokens['id'], array(
    'variable',
    'test',
  ), 'Page token has correct value.');
}