You are here

public function RulesFormsAPITestCase::testDeactivateForm in Rules Forms Support 7

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

Tests rules_forms_deactivate_form().

File

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

Class

RulesFormsAPITestCase
Tests Rules Forms actions.

Code

public function testDeactivateForm() {
  $this
    ->testActivateForm();
  $info = variable_get('rules_forms_form_info', array());
  $this
    ->assertTrue(isset($info['activate_test']), 'Ensure the form was activated.');
  rules_forms_deactivate_form('activate_test');
  $new_info = variable_get('rules_forms_form_info', array());
  $this
    ->assertTrue(!isset($new_info['activate_test']), 'Ensure the form was deactivated.');
}