public function EntityFormBlockTestCase::disableEntityFormBlock in Entityform block 7
1 call to EntityFormBlockTestCase::disableEntityFormBlock()
File
- ./
entityform_block.test, line 115 - Tests for the Entityform Block module
Class
- EntityFormBlockTestCase
- @file Tests for the Entityform Block module
Code
public function disableEntityFormBlock() {
$url = 'admin/structure/entityform_types/manage/' . $this->entityFormType;
$this
->drupalGet($url);
$this
->assertFieldChecked('edit-data-block-set-enable-block', "Enable block is checked.");
$this
->drupalGet('admin/structure/entityform_types/manage');
$this
->drupalPost($url, '', t('Save entityform type'));
$edit = array();
$edit['data[block_set][enable_block]'] = FALSE;
$this
->drupalPost($url, $edit, t('Save entityform type'));
$this
->assertRaw(t('Entityform block @title has been disabled.', array(
'@title' => $this->entityFormType,
)));
$block_types = array();
$exists = FALSE;
$block_types = variable_get('entityform_block_types');
if (!empty($block_types)) {
$exists = entityform_block_exists($block_types, $this->entityFormType);
}
$this
->assertFalse($exists, 'The entityform block is not in the variable');
}