You are here

public function RulesFormsAPITestCase::testActivateForm in Rules Forms Support 7.2

Same name and namespace in other branches
  1. 7 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 793
Rules Forms Support tests.

Class

RulesFormsAPITestCase
Tests Rules Forms actions.

Code

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