function CtoolsPageTokens::testSetPageToken

Test that we can set page tokens.

File

tests/page_tokens.test, line 38

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.');
}