You are here

protected function RulesFormsRulesTestCase::enableNodeForm in Rules Forms Support 7.2

Same name and namespace in other branches
  1. 7 rules_forms.test \RulesFormsRulesTestCase::enableNodeForm()

Enables form events for the node add form via the interface.

1 call to RulesFormsRulesTestCase::enableNodeForm()
RulesFormsEventsTestCase::setUp in ./rules_forms.test
Enables modules and logs in the privileged user.

File

./rules_forms.test, line 209
Rules Forms Support tests.

Class

RulesFormsRulesTestCase
Base class for testing Rules Forms rules.

Code

protected function enableNodeForm() {
  $this
    ->drupalGet(RULES_FORMS_ADMIN_PATH);
  $edit = array();
  $edit['enable_form_activation_message'] = 1;
  $this
    ->drupalPost(RULES_FORMS_ADMIN_PATH, $edit, t('Save settings'));
  $this
    ->drupalGet('node/add/article');
  $this
    ->clickLink('article_node_form');
  $edit = array();
  $edit['form_id_label'] = 'Article node form';
  $edit['button_validate_submit'] = 1;
  $this
    ->drupalPost('admin/config/workflow/rules/forms/article_node_form/activate/node%25252Fadd%25252Farticle', $edit, t('Activate'));
}