function BlockCacheAlter::testSimpleCacheChanges in Block Cache Alter 6
Test simple cache changes.
File
- ./
blockcache_alter.test, line 104 - Tests for Block Cache Alter
Class
- BlockCacheAlter
- @file Tests for Block Cache Alter
Code
function testSimpleCacheChanges() {
$admin_user = $this
->drupalCreateUser(array(
'administer blocks',
'administer nodes',
'post comments',
'administer comments',
));
$this
->drupalLogin($admin_user);
$edit = array();
$block = $this
->_createTestBlock();
foreach ($this
->_returnBlockCacheOptions() as $key => $value) {
$edit['cache_block'] = $key;
$this
->drupalPost('admin/build/block/configure/block/' . $block['delta'], $edit, t('Save block'));
$this
->assertText(t('The block configuration has been saved.'), t('Block successfully updated.'), t('Simple cache change.'));
$this
->assertEqual($this
->_checkBlockSetting($block['delta']), $key, $value, t('Simple cache change.'));
}
}