| 7 block.test | BlockCacheTestCase::testCacheGlobal() |
| 8 block.test | BlockCacheTestCase::testCacheGlobal() |
Test DRUPAL_CACHE_GLOBAL.
File
- modules/
block/ block.test, line 574 - Tests for block.module.
Code
function testCacheGlobal() {
$this->setCacheMode(DRUPAL_CACHE_GLOBAL);
$current_content = $this->randomName();
variable_set('block_test_content', $current_content);
$this->drupalGet('');
$this->assertText($current_content, t('Block content displays.'));
$old_content = $current_content;
$current_content = $this->randomName();
variable_set('block_test_content', $current_content);
$this->drupalLogout();
$this->drupalGet('user');
$this->assertText($old_content, t('Block content served from global cache.'));
}
Login or register to post comments