function BlockHTMLIdTestCase::setUp
Overrides DrupalWebTestCase::setUp
File
-
modules/
block/ block.test, line 689
Class
- BlockHTMLIdTestCase
- Test block HTML id validity.
Code
function setUp() {
parent::setUp('block_test');
// Create an admin user, log in and enable test blocks.
$this->admin_user = $this->drupalCreateUser(array(
'administer blocks',
'access administration pages',
));
$this->drupalLogin($this->admin_user);
// Enable our test block.
$edit['blocks[block_test_test_html_id][region]'] = 'sidebar_first';
$this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
// Make sure the block has some content so it will appear
$current_content = $this->randomName();
variable_set('block_test_content', $current_content);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.