You are here

public function RulesFormsAPITestCase::testActivateForm in Rules Forms Support 7

Same name and namespace in other branches
  1. 7.2 rules_forms.test \RulesFormsAPITestCase::testActivateForm()

Tests rules_forms_activate_form().

1 call to RulesFormsAPITestCase::testActivateForm()
RulesFormsAPITestCase::testDeactivateForm in ./rules_forms.test
Tests rules_forms_deactivate_form().

File

./rules_forms.test, line 768
Stores tests related to Rules Form.

Class

RulesFormsAPITestCase
Tests Rules Forms actions.

Code

public function testActivateForm() {
  variable_set('rules_forms_form_info', self::$formInfo);
  $form_id = 'activate_test';
  $form_info = array(
    'label' => 'Activate test',
    'elements' => array(),
    'buttons' => FALSE,
  );
  rules_forms_activate_form($form_id, $form_info);
  $info = variable_get('rules_forms_form_info', array());
  $this
    ->assertEqual($info[$form_id], $form_info, 'Ensure the form was activated.');
}