You are here

private function TagadelicTaxonomyTestCase::enableBlock in Tagadelic 7.2

3 calls to TagadelicTaxonomyTestCase::enableBlock()
TagadelicTaxonomyTestCase::testBlockHasMaxTwelveTags in tests/tagadelic_taxonomy.test
TagadelicTaxonomyTestCase::testBlockHasMoreLinkToPage in tests/tagadelic_taxonomy.test
TagadelicTaxonomyTestCase::testBlockRendering in tests/tagadelic_taxonomy.test

File

tests/tagadelic_taxonomy.test, line 255

Class

TagadelicTaxonomyTestCase

Code

private function enableBlock() {
  theme_enable(array(
    'seven',
  ));
  $region = 'content';
  $module = 'tagadelic_taxonomy';

  // set the block to a theme region, taken from block.test
  $delta = db_query("SELECT delta FROM {block} WHERE module = :module AND theme = :theme", array(
    ':module' => $module,
    ':theme' => 'seven',
  ))
    ->fetchField();
  $edit = array();
  $edit['blocks[' . $module . '_' . $delta . '][region]'] = $region;
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalPost('admin/structure/block', $edit, t('Save blocks'));
  $this
    ->drupalLogout();
}