diff --git a/README.txt b/README.txt
index fa6b498..b359eb4 100644
--- a/README.txt
+++ b/README.txt
@@ -20,18 +20,19 @@
 
  * Go to the "Form events" page in the Rules administration menu
    (admin/config/workflow/rules/forms).
- * Select the checkbox "Enable event activation messages on forms" and hit the "Save
-   settings" button.
+ * Select the checkbox "Enable event activation messages on forms" and hit the
+   "Save settings" button.
  * Go to the form on your site that you would like to customize with Rules, e.g.
    go to 'node/add/article' to enable events on the "Create Article" form.
- * On the top of the page you see a drupal message with a link to activate events
-   for the form, click it.
+ * On the top of the page you see a drupal message with a link to activate
+   events for the form, click it.
  * Enter a human-readable label for identifying the form.
- * In some cases you may want to enable events for individual buttons on the form.
-   To do so, check the checkbox labeled "Enable button level validate/submit events".
+ * In some cases you may want to enable events for individual buttons on the
+   form. To do so, check the checkbox labeled "Enable button level
+   validate/submit events".
  * Confirm the activation by clicking the "Activate" button.
- * Go to the "Triggered rules" admin page (admin/config/workflow/rules) and click
-   the "Add a new rule" link.
+ * Go to the "Triggered rules" admin page (admin/config/workflow/rules) and
+   click the "Add a new rule" link.
  * Fill out the label, choose a form event by selecting one in the "Rules Forms"
    group and confirm with "Save changes".
  * Now you can add conditions and actions to react on the form event.
@@ -60,46 +61,50 @@
 
  * Create a new reaction rule using the Rules interface.
  * Select the desired event for the target form.
- * On the following screen, you will be displayed a select list of form elements.
-   Select the target form element from the select list and click "Continue".
- * Note: Form elements are categorized by type to make them more easily identifiable.
- * In the event that the form element select list is not populated, try rebuilding
-   form element data as described below.
+ * On the following screen, you will be displayed a select list of form
+   elements. Select the target form element from the select list and click
+   "Continue".
+ * Note: Form elements are categorized by type to make them more easily
+   identifiable.
+ * In the event that the form element select list is not populated, try
+   rebuilding form element data as described below.
 
- #1429622: *The Rules data selector cannot currently be used to select form elements*
+ #1429622: *The Rules data selector cannot currently be used to select form
+   elements*
 
 
  Using the form element inspection tool
  --------------------------------------
 
- Rules forms support provides a tool for inspecting form elements on active forms.
- This tool can be used to determine the current attributes of form elements and to
- inspect elements following the execution of rules.
+ Rules forms support provides a tool for inspecting form elements on active
+ forms. This tool can be used to determine the current attributes of form
+ elements and to inspect elements following the execution of rules.
 
  * Navigate to the "Form events" page in the Rules administration menu
    (admin/config/workflow/rules/forms)
  * Select the checkbox labeled "Enable form element inspection tool".
  * Click the button label "Save settings".
  * To use the inspection tool, navigate to a form whose events are activated.
- * Mouse over the question mark (?) near any form element to display a list of that
-   element's current attributes and their values.
+ * Mouse over the question mark (?) near any form element to display a list of
+   that element's current attributes and their values.
 
 
  Rebuilding form element data
  ----------------------------
 
- In the event that form elements are not being displayed within the element select list
- in the rules interface, you can rebuild Rules forms' internal storage of form element
- data.
+ In the event that form elements are not being displayed within the element
+ select list in the rules interface, you can rebuild Rules forms' internal
+ storage of form element data.
 
  * Navigate to the "Form events" page in the Rules administration menu
    (admin/config/workflow/rules/forms)
  * Expand the fieldset labeled "Form elements".
  * Select the form whose elements you want to rebuild from the select list.
  * Click the "Rebuild" button.
- * Finally, navigate to the form whose elements need to be rebuilt. When the form is
-   displayed for the first time, Rules forms will evaluate it and display a message
-   notifying the user that its internal memory has been updated.
+ * Finally, navigate to the form whose elements need to be rebuilt. When the
+   form is displayed for the first time, Rules forms will evaluate it and
+   display a message notifying the user that its internal memory has been
+   updated.
 
 
  Deactivate a form
@@ -112,6 +117,5 @@
  * Expand the fieldset labeled "Active forms".
  * Select the forms you would like to disable from the checkboxes.
  * Click the button labeled "Deactivate events".
- * Note: deactivating form events will break existing rules that implement events
-   provided by those forms.
-
+ * Note: deactivating form events will break existing rules that implement
+   events provided by those forms.
diff --git a/rules_forms.info b/rules_forms.info
index ac5c8b0..c3f40ab 100644
--- a/rules_forms.info
+++ b/rules_forms.info
@@ -1,6 +1,7 @@
 name = Rules Forms Support
 description = Provides events, conditions and actions for rule-based form customization.
 core = 7.x
+configure = admin/config/workflow/rules/forms
 package = Rules
 dependencies[] = rules
 files[] = includes/rules_forms.property.inc
diff --git a/rules_forms.install b/rules_forms.install
index 135b425..be88437 100755
--- a/rules_forms.install
+++ b/rules_forms.install
@@ -53,12 +53,13 @@ function rules_forms_schema() {
 function rules_forms_install() {
   // Set the modules' weight to 20, because we want it to be the last one using
   // hook_form_alter().
-  db_query("UPDATE {system} SET weight = 20 WHERE name = 'rules_forms'");
+  db_update('system')
+    ->fields(array('weight', 20))
+    ->condition('name', 'rules_forms');
 
+  $t = get_t();
   // Notify the user of configuration requirements for Rules Forms.
-  drupal_set_message(st('You may now <a href="!rules_forms_settings">enable Rules Forms rules</a> '.
-                        'for individual forms. For more information please consult the documentation '.
-                        'in README.txt in your Rules forms support module folder.',
+  drupal_set_message($t('You may now <a href="!rules_forms_settings">enable Rules Forms rules</a> for individual forms. For more information please consult the documentation in README.txt in your Rules forms support module folder.',
                         array('!rules_forms_settings' => url(RULES_FORMS_ADMIN_PATH))), 'status');
 }
 
@@ -77,9 +78,12 @@ function rules_forms_update_7101() {
 }
 
 /**
- * See http://drupal.org/node/1447328#comment-5640172
+ * Removes empty values from rules_forms_event_info.
+ *
  * Unset rules_forms_event_info array values with empty keys to
  * cleanse the settings array of bad form information.
+ *
+ * @see http://drupal.org/node/1447328#comment-5640172
  */
 function rules_forms_update_7102() {
   $event_info = variable_get('rules_forms_event_info', array());
diff --git a/rules_forms.module b/rules_forms.module
index b5c1336..4a76629 100755
--- a/rules_forms.module
+++ b/rules_forms.module
@@ -11,12 +11,11 @@ define('RULES_FORMS_ADMIN_PATH', 'admin/config/workflow/rules/forms');
  * Implements hook_help().
  */
 function rules_forms_help($path, $arg) {
-	switch ($path) {
+  switch ($path) {
     case 'admin/help#rules_forms':
-      return '<p>' . t('Rules Forms Support provides Rules events, conditions, and actions for any form '.
-                       'built with the Drupal form API. To activate events for a form you must first '.
-                       'visit <a href="!admin">Rules Forms settings</a> and enable activation messages.',
+      return '<p>' . t('Rules Forms Support provides Rules events, conditions, and actions for any form built with the Drupal form API. To activate events for a form you must first visit <a href="!admin">Rules Forms settings</a> and enable activation messages.',
                        array('!admin' => url(RULES_FORMS_ADMIN_PATH))) . '</p>';
+
     case RULES_FORMS_ADMIN_PATH:
       return '<p>' . t('Settings and overview of form events and active elements.') . '</p>';
   }
@@ -71,7 +70,7 @@ function rules_forms_hook_info() {
   $hooks['rules_forms_element_info'] = array(
     'group' => 'info',
   );
-  $hook['rules_forms_element_info_alter'] = array(
+  $hooks['rules_forms_element_info_alter'] = array(
     'group' => 'info',
   );
   return $hooks;
@@ -143,7 +142,7 @@ function rules_forms_create_structure() {
  * Implements hook_form_alter().
  */
 function rules_forms_form_alter(&$form, &$form_state, $form_id) {
-  if ($form_info = rules_forms_get_form_info($form_id)) {
+  if (rules_forms_get_form_info($form_id)) {
     // Set elements for form events.
     rules_forms_event_build($form, $form_state, $form_id);
     $form['#validate'][] = 'rules_forms_event_validate';
@@ -155,9 +154,9 @@ function rules_forms_form_alter(&$form, &$form_state, $form_id) {
   elseif (!empty($_SESSION['rules_forms_message'])) {
     // Display form ID message if enabled for this session.
     $uri = drupal_get_destination();
-    $link = l($form_id, RULES_FORMS_ADMIN_PATH . '/' . $form_id . '/activate/'. urlencode(trim($uri['destination'], '/')));
-    $msg = t('Activate events for ');
-    drupal_set_message($msg . $link, 'status', FALSE);
+    $link = l($form_id, RULES_FORMS_ADMIN_PATH . '/' . $form_id . '/activate/' . urlencode(trim($uri['destination'], '/')));
+    $msg = t('Activate events for');
+    drupal_set_message($msg . ' ' . $link, 'status', FALSE);
   }
 }
 
@@ -171,7 +170,7 @@ function rules_forms_event_build(&$form, &$form_state, $form_id) {
 }
 
 /**
- * Validation handler to invoke "form validate" events
+ * Validation handler to invoke "form validate" events.
  *
  * @see rules_forms_form_alter()
  */
@@ -180,7 +179,7 @@ function rules_forms_event_validate(&$form, &$form_state) {
 }
 
 /**
- * Submit handler to invoke "form submitted" events
+ * Submit handler to invoke "form submitted" events.
  *
  * @see rules_forms_form_alter()
  */
@@ -192,12 +191,13 @@ function rules_forms_event_submit(&$form, &$form_state) {
  * Invoke rules event of a certain type.
  *
  * @param string $event_type
- *   The type of Rules Forms event being invoked.
+ *   Possible values:
  *   - form_built
  *   - form_validate
  *   - form_submit
  *   - button_ELEMENT_ID_validate
  *   - button_ELEMENT_ID_submit
+ *   The type of Rules Forms event being invoked.
  * @param array $form
  *   A reference to the form array for which the event is being invoked.
  * @param array $form_state
@@ -257,7 +257,7 @@ function rules_forms_activate_form(array $info) {
     'properties' => serialize($info['properties']),
     'rebuild' => $info['rebuild'] == TRUE ? 1 : 0,
   );
-  $result = db_insert('rules_forms')
+  db_insert('rules_forms')
     ->fields($fields)
     ->execute();
   return SAVED_NEW;
@@ -276,7 +276,7 @@ function rules_forms_update_form_info(array $info) {
     'properties' => serialize($info['properties']),
     'rebuild' => $info['rebuild'] == TRUE ? 1 : 0,
   );
-  $result = db_update('rules_forms')
+  db_update('rules_forms')
     ->fields($fields)
     ->condition('form_id', $fields['form_id'])
     ->execute();
@@ -324,7 +324,7 @@ function rules_forms_get_form_info($form_id = NULL) {
  *   The form ID.
  */
 function rules_forms_deactivate_form($form_id) {
-  $result = db_delete('rules_forms')
+  db_delete('rules_forms')
     ->condition('form_id', $form_id)
     ->execute();
   return SAVED_DELETED;
diff --git a/rules_forms.rules.inc b/rules_forms.rules.inc
index 703ad8a..f711492 100755
--- a/rules_forms.rules.inc
+++ b/rules_forms.rules.inc
@@ -27,7 +27,7 @@ function rules_forms_rules_event_info() {
           'label' => $info['label'],
         ),
         'form_state' => array(
-          'type' => $form_id .'_state',
+          'type' => $form_id . '_state',
           'label' => t('@form state', array('@form' => $info['label'])),
         ),
       ),
@@ -44,9 +44,9 @@ function rules_forms_rules_event_info() {
   }
   return $events;
 }
-
-/**
- * Implements hook_rules_condition_info().
+
+/**
+ * Implements hook_rules_condition_info().
  */
 function rules_forms_rules_condition_info() {
   $conditions = array();
@@ -75,8 +75,7 @@ function rules_forms_rules_condition_info() {
         'type' => 'boolean',
         'label' => t('Evaluate as regular expression'),
         'optional' => TRUE,
-        'description' => t('Perform the data comparison using the provided value as a regular expression. '.
-                           'To execute multiple regular expressions, enter one expression per line.'),
+        'description' => t('Perform the data comparison using the provided value as a regular expression. To execute multiple regular expressions, enter one expression per line.'),
       ),
     ),
     'base' => 'rules_forms_condition_element_value',
@@ -108,8 +107,7 @@ function rules_forms_rules_condition_info() {
         'type' => 'boolean',
         'label' => t('Evaluate as regular expression'),
         'optional' => TRUE,
-        'description' => t('Perform the data comparison using the provided value as a regular expression. '.
-                           'To execute multiple regular expressions, enter one expression per line.'),
+        'description' => t('Perform the data comparison using the provided value as a regular expression. To execute multiple regular expressions, enter one expression per line.'),
       ),
     ),
     'base' => 'rules_forms_condition_attribute_value',
@@ -158,9 +156,9 @@ function rules_forms_rules_condition_info() {
   );
   return $conditions;
 }
-
-/**
- * Implements hook_rules_action_info().
+
+/**
+ * Implements hook_rules_action_info().
  */
 function rules_forms_rules_action_info() {
   $actions = array();
@@ -194,8 +192,8 @@ function rules_forms_rules_action_info() {
   $actions['rules_forms_set_error'] = array(
     'label' => t('Set an error on the form'),
     'group' => 'Rules Forms',
-    'parameter' =>  array(
-      // We use the 'data' and 'value' keys to support reuse of the form alter callback.
+    'parameter' => array(
+      // We use the 'data' and 'value' keys to support reuse of the callback.
       'data' => array(
         'type' => 'form_element',
         'label' => t('Targeted element'),
@@ -250,18 +248,18 @@ function rules_forms_rules_action_info() {
  * Implements hook_rules_data_info().
  */
 function rules_forms_rules_data_info() {
-  // Base data types for form and form_states.
-  $data_info['form'] = array(
-    'label' => t('form'),
-    'group' => t('Rules Forms'),
+  // Base data types for form and form_states.
+  $data_info['form'] = array(
+    'label' => t('form'),
+    'group' => t('Rules Forms'),
     'wrap' => TRUE,
-    'wrapper class' => 'RulesFormsFormWrapper',
-  );
-  $data_info['form_state'] = array(
-    'label' => t('form state'),
-    'group' => t('Rules Forms'),
+    'wrapper class' => 'RulesFormsFormWrapper',
+  );
+  $data_info['form_state'] = array(
+    'label' => t('form state'),
+    'group' => t('Rules Forms'),
     'wrap' => TRUE,
-    'wrapper class' => 'RulesFormsFormStateWrapper',
+    'wrapper class' => 'RulesFormsFormStateWrapper',
   );
 
   // Each active form has its own data type with unique property info
@@ -275,7 +273,7 @@ function rules_forms_rules_data_info() {
       'wrap' => TRUE,
       'wrapper class' => 'RulesFormsFormWrapper',
     );
-    $data_info[$form_id .'_state'] = array(
+    $data_info[$form_id . '_state'] = array(
       'label' => t('@form state', array('@form' => $info['label'])),
       'group' => t('Rules Forms'),
       'parent' => 'form_state',
@@ -322,6 +320,7 @@ function rules_forms_create_element($values = array()) {
 
 /**
  * Form alter callback for the data_set action.
+ *
  * This function was largely taken from Rules.
  */
 function rules_forms_property_value_form_alter(&$form, &$form_state, $options, RulesAbstractPlugin $element) {
diff --git a/rules_forms.test b/rules_forms.test
index b036bac..963817c 100644
--- a/rules_forms.test
+++ b/rules_forms.test
@@ -1,11 +1,19 @@
 <?php
 
+/**
+ * @file
+ * Rules Forms Support tests.
+ */
+
+/**
+ * Rules Forms Support test class.
+ */
 class RulesFormsInterfaceTestCase extends DrupalWebTestCase {
 
   /**
    * Provides a user with permissions to administer rules forms.
    */
-  protected $privileged_user;
+  protected $privilegeUser;
 
   /**
    * Defines test information.
@@ -59,7 +67,7 @@ class RulesFormsInterfaceTestCase extends DrupalWebTestCase {
     $edit = array();
     $edit['form_id_label'] = 'Article node form';
     $this->drupalPost('admin/config/workflow/rules/forms/article_node_form/activate/node%25252Fadd%25252Farticle', $edit, t('Activate'));
-    $this->assertText('article_node_form '. t('has been activated.'));
+    $this->assertText('article_node_form ' . t('has been activated.'));
 
     // Ensure that the newly activated form is shown in administration.
     $this->drupalGet(RULES_FORMS_ADMIN_PATH);
@@ -95,71 +103,74 @@ class RulesFormsInterfaceTestCase extends DrupalWebTestCase {
  * Base class for testing Rules Forms rules.
  */
 class RulesFormsRulesTestCase extends DrupalWebTestCase {
-  
-  /**
-   * Provides a user with permissions to administer rules forms.
-   */
-  protected $privileged_user;
-
-  /**
-   * A test form for passing as an argument in events.
-   */
-  protected static $_form = array(
+
+  /**
+   * Provides a user with permissions to administer rules forms.
+   */
+  protected $privilegeUser;
+
+  /**
+   * A test form for passing as an argument in events.
+   */
+  protected static $form = array(
     'form_id' => array(
       '#type' => 'value',
       '#value' => 'test_form',
-    ),
-    'title' => array(
-      '#type' => 'textfield',
-      '#title' => 'test title',
-      '#default_value' => 'tset',
-    ),
-    'body' => array(LANGUAGE_NONE => array(array(
-      'value' => array(
-        '#type' => 'textarea',
-        '#title' => 'test body',
-        '#default_value' => 'tset',
-      ),
-    ))),
-    'fieldset' => array(
-      '#type' => 'fieldset',
-      '#title' => 'test fieldset',
-      'select' => array(
-        '#type' => 'select',
-        '#title' => 'tset select',
-        '#options' => array('first' => 'option1', 'second' => 'option2'),
-        '#value' => 'tset',
-        '#default_value' => 'test',
-      ),
-      'checkboxes' => array(
-        '#type' => 'checkboxes',
-        '#title' => 'test checkboxes',
-        '#options' => array('frist' => '1option', 'sceond' => '2option'),
-        '#value' => 'tset',
-        '#default_value' => 'test',
-      ),
-    ),
-  );
-
-  /**
-   * A test form state array for passing as an argument in events.
-   */
-  protected static $_form_state = array(
-    'values' => array(
-      'title' => 'tset',
-      'body' => 'tset',
-    ),
-  );
-
-  /**
-   * Defines a form ID for a form whose events are activated in tests.
-   */
-  protected static $_form_id = 'test_form';
+    ),
+    'title' => array(
+      '#type' => 'textfield',
+      '#title' => 'test title',
+      '#default_value' => 'test',
+    ),
+    'body' => array(
+      LANGUAGE_NONE => array(array(
+        'value' => array(
+          '#type' => 'textarea',
+          '#title' => 'test body',
+          '#default_value' => 'test',
+        ),
+      ),
+      ),
+    ),
+    'fieldset' => array(
+      '#type' => 'fieldset',
+      '#title' => 'test fieldset',
+      'select' => array(
+        '#type' => 'select',
+        '#title' => 'test select',
+        '#options' => array('first' => t('option1'), 'second' => t('option2')),
+        '#value' => 'test',
+        '#default_value' => 'test',
+      ),
+      'checkboxes' => array(
+        '#type' => 'checkboxes',
+        '#title' => 'test checkboxes',
+        '#options' => array('frist' => t('1option'), 'sceond' => t('2option')),
+        '#value' => 'test',
+        '#default_value' => 'test',
+      ),
+    ),
+  );
+
+  /**
+   * A test form state array for passing as an argument in events.
+   */
+  protected static $formState = array(
+    'values' => array(
+      'title' => 'test',
+      'body' => 'test',
+    ),
+  );
+
+  /**
+   * Defines a form ID for a form whose events are activated in tests.
+   */
+  protected static $formId = 'test_form';
 
   /**
    * Defines testable settings for the rules_forms_form_info variable.
    */
-  protected static $_form_info = array(
+  protected static $formInfo = array(
     'test_form' => array(
       'label' => 'Test form',
       'elements' => array(
@@ -174,38 +185,38 @@ class RulesFormsRulesTestCase extends DrupalWebTestCase {
       'submit' => array(),
       'reset' => FALSE,
     ),
-  );
-
-  /**
-   * Sets up the test.
-   */
-  public function setUp() {
-    parent::setUp('rules_forms', 'rules');
-    $this->privileged_user = $this->drupalCreateUser(array(
-        'administer nodes',
-        'access content',
-        'create article content',
-        'administer rules forms rules',
-        'administer rules forms',
-        'administer site configuration',
-    ));
-    $this->drupalLogin($this->privileged_user);
-  }
-  
-  /**
-   * Enables form events for the node add form via the interface.
-   */
-  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();
+  );
+
+  /**
+   * Sets up the test.
+   */
+  public function setUp() {
+    parent::setUp('rules_forms', 'rules');
+    $this->privileged_user = $this->drupalCreateUser(array(
+      'administer nodes',
+      'access content',
+      'create article content',
+      'administer rules forms rules',
+      'administer rules forms',
+      'administer site configuration',
+    ));
+    $this->drupalLogin($this->privileged_user);
+  }
+
+  /**
+   * Enables form events for the node add form via the interface.
+   */
+  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'));
+    $edit['button_validate_submit'] = 1;
+    $this->drupalPost('admin/config/workflow/rules/forms/article_node_form/activate/node%25252Fadd%25252Farticle', $edit, t('Activate'));
   }
 
 }
@@ -215,23 +226,23 @@ class RulesFormsRulesTestCase extends DrupalWebTestCase {
  */
 class RulesFormsEventsTestCase extends RulesFormsRulesTestCase {
 
-  /**
-   * Defines test information.
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Rules Forms events',
-      'description' => 'Tests Rules Forms events.',
-      'group' => 'Rules Forms',
-    );
-  }
-  
-  /**
-   * Enables modules and logs in the privileged user.
-   */
-  public function setUp() {
+  /**
+   * Defines test information.
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Rules Forms events',
+      'description' => 'Tests Rules Forms events.',
+      'group' => 'Rules Forms',
+    );
+  }
+
+  /**
+   * Enables modules and logs in the privileged user.
+   */
+  public function setUp() {
     parent::setUp();
-    $this->_enableNodeForm();
+    $this->enableNodeForm();
   }
 
   /**
@@ -252,7 +263,7 @@ class RulesFormsEventsTestCase extends RulesFormsRulesTestCase {
    * Tests the form validate event.
    */
   public function testFormValidate() {
-    // We use the site information page to perform form validation since the node
+    // We use site information page to perform form validation since the node
     // edit form uses button level validation.
     $edit = array();
     $edit['form_id_label'] = 'Article node form';
@@ -325,16 +336,16 @@ class RulesFormsEventsTestCase extends RulesFormsRulesTestCase {
  * Tests Rules Forms conditions.
  */
 class RulesFormsConditionsTestCase extends RulesFormsRulesTestCase {
-
-  /**
-   * Defines test information.
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Rules Forms conditions',
-      'description' => 'Tests Rules Forms condition callbacks.',
-      'group' => 'Rules Forms',
-    );
+
+  /**
+   * Defines test information.
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Rules Forms conditions',
+      'description' => 'Tests Rules Forms condition callbacks.',
+      'group' => 'Rules Forms',
+    );
   }
 
   /**
@@ -350,52 +361,112 @@ class RulesFormsConditionsTestCase extends RulesFormsRulesTestCase {
   public function testElementValueCondition() {
     // Test the condition with a regular value in the field.
     $form = array();
-    $test_form['test'] = array('#type' => 'textfield', '#value' => 'tset', '#default_value' => 'tset');
+    $test_form['test'] = array(
+      '#type' => 'textfield',
+      '#value' => 'test',
+      '#default_value' => 'test',
+    );
     $form = new ArrayObject($test_form);
-    $form_state = new ArrayObject(array());
+    $formState = new ArrayObject(array());
 
     // Test with a correctly matching field value.
-    $condition1 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => 'tset', 'regex' => 0));
-    $result1 = $condition1->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $condition1 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => 'test',
+      'regex' => 0,
+    ));
+    $result1 = $condition1->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertTrue($result1, t('Element values are equal.'));
 
     // Test with an incorrectly matching field value.
-    $condition2 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => 'test', 'regex' => 0));
-    $result2 = $condition2->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $condition2 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => 'test',
+      'regex' => 0,
+    ));
+    $result2 = $condition2->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertFalse($result2, t('Element values are not equal.'));
 
     // Test with a correctly matching regular expression.
-    $condition3 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => '/se/', 'regex' => 1));
-    $result3 = $condition3->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $condition3 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => '/se/',
+      'regex' => 1,
+    ));
+    $result3 = $condition3->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertTrue($result3, t('Regular expression evaluation: value is equal.'));
 
     // Test with a correctly matching regular expression.
-    $condition4 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => '/es/', 'regex' => 1));
-    $result4 = $condition4->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $condition4 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => '/es/',
+      'regex' => 1,
+    ));
+    $result4 = $condition4->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertFalse($result4, t('Regular expression evaluation: value is not equal.'));
 
-    // Test the condition with only a default value in the field.
+    // Test the condition with only a default value in the field.
     unset($test_form['test']['#value']);
-    $form = new ArrayObject($test_form);
+    $form = new ArrayObject($test_form);
 
-    // Test with a correctly matching default field value.
-    $condition5 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => 'tset', 'regex' => 0));
-    $result5 = $condition5->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    // Test with a correctly matching default field value.
+    $condition5 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => 'test',
+      'regex' => 0,
+    ));
+    $result5 = $condition5->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertTrue($result5, t('Element values are equal.'));
 
-    // Test with an incorrectly matching default field value.
-    $condition6 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => 'test', 'regex' => 0));
-    $result6 = $condition6->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    // Test with an incorrectly matching default field value.
+    $condition6 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => 'test',
+      'regex' => 0,
+    ));
+    $result6 = $condition6->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertFalse($result6, t('Element values are not equal.'));
 
     // Test with a correctly matching regular expression default value.
-    $condition7 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => '/se/', 'regex' => 1));
-    $result7 = $condition7->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $condition7 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => '/se/',
+      'regex' => 1,
+    ));
+    $result7 = $condition7->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertTrue($result7, t('Regular expression evaluation: value is equal.'));
 
     // Test with a correctly matching regular expression.
-    $condition8 = rules_condition('rules_forms_element_value', array('element' => 'textfield:test', 'value' => '/es/', 'regex' => 1));
-    $result8 = $condition8->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $condition8 = rules_condition('rules_forms_element_value', array(
+      'element' => 'textfield:test',
+      'value' => '/es/',
+      'regex' => 1,
+    ));
+    $result8 = $condition8->executeByArgs(array(
+      'form' => $form,
+      'form_state' => $formState,
+    ));
     $this->assertFalse($result8, t('Regular expression evaluation: value is not equal.'));
   }
 
@@ -403,23 +474,23 @@ class RulesFormsConditionsTestCase extends RulesFormsRulesTestCase {
    * Tests callback for Condition: Element value has changed.
    */
   public function testElementValueChangedCondition() {
-    $form = self::$_form;
-    $form_state = self::$_form_state;
+    $form = self::$form;
+    $formState = self::$formState;
 
     // rules_forms_event_build will set session variables.
-    variable_set('rules_forms_form_info', self::$_form_info);
-    rules_forms_event_build($form, $form_state, self::$_form_id);
+    variable_set('rules_forms_form_info', self::$formInfo);
+    rules_forms_event_build($form, $formState, self::$formId);
 
     // Execute condition without changing the value.
-    $form_state['values']['title'] = 'tset';
-    $condition1 = rules_condition('rules_forms_element_changed', array('element' => 'textfield:title'));
-    $result1 = $condition1->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $formState['values']['title'] = 'test';
+    $condition1 = rules_condition('rules_forms_element_changed', array('element' => 'textfield:title'));
+    $result1 = $condition1->executeByArgs(array('form' => $form, 'form_state' => $formState));
     $this->assertFalse($result1, 'Form value has not changed.');
 
     // Execute condition with changing the value.
-    $form_state['values']['title'] = 'test';
+    $formState['values']['title'] = 'test';
     $condition2 = rules_condition('rules_forms_element_changed', array('element' => 'textfield:title'));
-    $result2 = $condition2->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $result2 = $condition2->executeByArgs(array('form' => $form, 'form_state' => $formState));
     $this->assertTrue($result2, 'Form value has changed.');
   }
 
@@ -427,8 +498,8 @@ class RulesFormsConditionsTestCase extends RulesFormsRulesTestCase {
    * Tests callback for Condition: Form button was clicked.
    */
   public function testFormButtonClickedCondition() {
-    $form = self::$_form;
-    $form_state = self::$_form_state;
+    $form = self::$form;
+    $formState = self::$formState;
 
     $form['test_submit'] = array(
       '#name' => 'test_submit',
@@ -438,15 +509,19 @@ class RulesFormsConditionsTestCase extends RulesFormsRulesTestCase {
     );
 
     // Test for condition not met.
-    $form_state['triggering_element'] = array('#name' => 'test_button', '#type' => 'button', '#value' => 'Test');
+    $formState['triggering_element'] = array(
+      '#name' => 'test_button',
+      '#type' => 'button',
+      '#value' => 'Test',
+    );
     $condition1 = rules_condition('rules_forms_button_clicked', array('element' => 'submit:test_submit'));
-    $result1 = $condition1->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $result1 = $condition1->executeByArgs(array('form' => $form, 'form_state' => $formState));
     $this->assertFalse($result1, 'Clicked button condition not met.');
 
     // Test for condition met.
-    $form_state['triggering_element'] = $form['test_submit'];
+    $formState['triggering_element'] = $form['test_submit'];
     $condition2 = rules_condition('rules_forms_button_clicked', array('element' => 'submit:test_submit'));
-    $result2 = $condition2->executeByArgs(array('form' => $form, 'form_state' => $form_state));
+    $result2 = $condition2->executeByArgs(array('form' => $form, 'form_state' => $formState));
     $this->assertTrue($result2, 'Clicked button condition met.');
   }
 
@@ -456,16 +531,16 @@ class RulesFormsConditionsTestCase extends RulesFormsRulesTestCase {
  * Tests Rules Forms actions.
  */
 class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
-
-  /**
-   * Defines test information.
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Rules Forms actions',
-      'description' => 'Tests Rules Forms action callbacks.',
-      'group' => 'Rules Forms',
-    );
+
+  /**
+   * Defines test information.
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Rules Forms actions',
+      'description' => 'Tests Rules Forms action callbacks.',
+      'group' => 'Rules Forms',
+    );
   }
 
   /**
@@ -478,9 +553,9 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Set element title.
    */
-  public function testSetTitleAction() {
+  public function testestTitleAction() {
     $form = array();
-    $form['test'] = array('#type' => 'textfield', '#title' => 'tset');
+    $form['test'] = array('#type' => 'textfield', '#title' => 'test');
     $form = new ArrayObject($form);
     $action = rules_action('rules_forms_set_title', array('element' => 'textfield:test', 'title' => 'test'));
     $action->executeByArgs(array('form' => $form));
@@ -490,9 +565,9 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Set element description.
    */
-  public function testSetDescriptionAction() {
+  public function testestDescriptionAction() {
     $form = array();
-    $form['test'] = array('#type' => 'textfield', '#description' => 'tset');
+    $form['test'] = array('#type' => 'textfield', '#description' => t('test'));
     $form = new ArrayObject($form);
     $action = rules_action('rules_forms_set_description', array('element' => 'textfield:test', 'description' => 'test'));
     $action->executeByArgs(array('form' => $form));
@@ -514,7 +589,7 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Disable form element.
    */
-  public function testSetDisabledAction() {
+  public function testestDisabledAction() {
     $form = array();
     $form['test'] = array('#type' => 'textfield', '#disabled' => FALSE);
     $form = new ArrayObject($form);
@@ -526,7 +601,7 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Require form element.
    */
-  public function testSetRequiredAction() {
+  public function testestRequiredAction() {
     $form = array();
     $form['test'] = array('#type' => 'textfield', '#required' => FALSE);
     $form = new ArrayObject($form);
@@ -538,21 +613,21 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Set multiple value options.
    */
-  public function testSetOptionsAction() {
+  public function testestOptionsAction() {
     $form = array();
-    $form['test'] = array('#type' => 'textfield', '#options' => array('first' => 'tset'));
+    $form['test'] = array('#type' => 'textfield', '#options' => array('first' => 'test'));
     $form = new ArrayObject($form);
-    $action = rules_action('rules_forms_set_options', array('element' => 'textfield:test', 'options' => 'first|test'. "\r\n" .'second|tset'));
+    $action = rules_action('rules_forms_set_options', array('element' => 'textfield:test', 'options' => 'first|test' . "\r\n" . 'second|test'));
     $action->executeByArgs(array('form' => $form));
-    $this->assertEqual($form['test']['#options'], array('first' => 'test', 'second' => 'tset'));
+    $this->assertEqual($form['test']['#options'], array('first' => 'test', 'second' => 'test'));
   }
 
   /**
    * Tests callback for Action: Set default value of a form element.
    */
-  public function testSetDefaultAction() {
+  public function testestDefaultAction() {
     $form = array();
-    $form['test'] = array('#type' => 'textfield', '#default_value' => 'tset');
+    $form['test'] = array('#type' => 'textfield', '#default_value' => 'test');
     $form = new ArrayObject($form);
     $action = rules_action('rules_forms_set_default', array('element' => 'textfield:test', 'value' => 'test'));
     $action->executeByArgs(array('form' => $form));
@@ -562,7 +637,7 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Set element weight.
    */
-  public function testSetWeightAction() {
+  public function testestWeightAction() {
     $form = array();
     $form['test'] = array('#type' => 'textfield', '#weight' => 0);
     $form = new ArrayObject($form);
@@ -574,15 +649,19 @@ class RulesFormsActionsTestCase extends RulesFormsRulesTestCase {
   /**
    * Tests callback for Action: Set element prefix/suffix HTML.
    */
-  public function testSetPrefixSuffixAction() {
+  public function testestPrefixSuffixAction() {
     $form = array();
     $form['test'] = array(
       '#type' => 'textfield',
-      '#prefix' => 'tset',
+      '#prefix' => 'test',
       '#suffix' => 'test',
     );
     $form = new ArrayObject($form);
-    $action = rules_action('rules_forms_set_prefix_suffix', array('element' => 'textfield:test', 'prefix' => '<div id="test">', 'suffix' => '</div>'));
+    $action = rules_action('rules_forms_set_prefix_suffix', array(
+      'element' => 'textfield:test',
+      'prefix' => '<div id="test">',
+      'suffix' => '</div>',
+    ));
     $action->executeByArgs(array('form' => $form));
     $this->assertEqual($form['test']['#prefix'], '<div id="test">');
     $this->assertEqual($form['test']['#suffix'], '</div>');
@@ -610,7 +689,7 @@ class RulesFormsAPITestCase extends RulesFormsRulesTestCase {
    * Enables modules and logs in the privileged user.
    */
   public function setUp() {
-    variable_set('rules_forms_form_info', self::$_form_info);
+    variable_set('rules_forms_form_info', self::$formInfo);
     parent::setUp();
   }
 
@@ -619,14 +698,14 @@ class RulesFormsAPITestCase extends RulesFormsRulesTestCase {
    */
   public function testGetElement() {
     // Test retrieving the element.
-    $form = self::$_form;
+    $form = self::$form;
     $element_id = 'select:fieldset:select';
     $element = &_rules_forms_get_element($form, $element_id);
     $this->assertEqual($element, array(
       '#type' => 'select',
-      '#title' => 'tset select',
-      '#options' => array('first' => 'option1', 'second' => 'option2'),
-      '#value' => 'tset',
+      '#title' => 'test select',
+      '#options' => array('first' => t('option1'), 'second' => t('option2')),
+      '#value' => 'test',
       '#default_value' => 'test',
     ));
 
@@ -639,16 +718,16 @@ class RulesFormsAPITestCase extends RulesFormsRulesTestCase {
    * Tests _rules_forms_get_elements().
    */
   public function testGetElements() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    $form = self::$_form;
+    variable_set('rules_forms_form_info', self::$formInfo);
+    $form = self::$form;
     $elements = &_rules_forms_get_elements($form);
-    foreach ($elements as $element_id => &$element) {
+    foreach ($elements as &$element) {
       $element['test'] = 'test';
     }
     // Ensure that references are preserved by _rules_forms_get_elements().
     $message = 'Ensure the reference to $form is preserved.';
     $this->assertTrue(isset($form['title']['test']) && $form['title']['test'] == 'test', $message);
-    $this->assertTrue(isset($form['body']['und'][0]['value']['test']) && $form['body']['und'][0]['value']['test'] == 'test', $message);
+    $this->assertTrue(isset($form['body'][LANGUAGE_NONE][0]['value']['test']) && $form['body'][LANGUAGE_NONE][0]['value']['test'] == 'test', $message);
     $this->assertTrue(isset($form['fieldset']['select']['test']) && $form['fieldset']['select']['test'] == 'test', $message);
     $this->assertTrue(isset($form['fieldset']['checkboxes']['test']) && $form['fieldset']['checkboxes']['test'] == 'test', $message);
 
@@ -661,63 +740,67 @@ class RulesFormsAPITestCase extends RulesFormsRulesTestCase {
    * Tests rules_forms_get_form_info().
    */
   public function testGetFormInfo() {
-    variable_set('rules_forms_form_info', self::$_form_info);
+    variable_set('rules_forms_form_info', self::$formInfo);
     // Test getting all form info.
     $info = rules_forms_get_form_info();
-    $this->assertEqual($info, self::$_form_info);
+    $this->assertEqual($info, self::$formInfo);
 
     // Test getting info by form ID.
-    $form_id = key(self::$_form_info);
-    $form_info = rules_forms_get_form_info($form_id);
-    $this->assertEqual($form_info, self::$_form_info[$form_id]);
+    $formId = key(self::$formInfo);
+    $formInfo = rules_forms_get_form_info($formId);
+    $this->assertEqual($formInfo, self::$formInfo[$formId]);
 
     // Test getting info by $form array.
-    $form_info = rules_forms_get_form_info(self::$_form);
-    $this->assertEqual($form_info, self::$_form_info[self::$_form['form_id']['#value']]);
+    $formInfo = rules_forms_get_form_info(self::$form);
+    $this->assertEqual($formInfo, self::$formInfo[self::$form['form_id']['#value']]);
   }
 
   /**
    * Tests rules_forms_save_form_info().
    */
   public function testSaveFormInfo() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    $form_info = self::$_form_info;
+    variable_set('rules_forms_form_info', self::$formInfo);
+    $formInfo = self::$formInfo;
 
-    $form_info['label'] = 'save test';
-    rules_forms_save_form_info(self::$_form_id, $form_info);
+    $formInfo['label'] = 'save test';
+    rules_forms_save_form_info(self::$formId, $formInfo);
 
     $result = variable_get('rules_forms_form_info', array());
-    $this->assertTrue($result[self::$_form_id]['label'] == 'save test');
+    $this->assertTrue($result[self::$formId]['label'] == 'save test');
   }
 
   /**
    * Tests rules_forms_get_element_info().
    */
   public function testGetElementInfo() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    $element_info = rules_forms_get_element_info(self::$_form_id);
-    $this->assertEqual($element_info, self::$_form_info[self::$_form_id]['elements']);
+    variable_set('rules_forms_form_info', self::$formInfo);
+    $element_info = rules_forms_get_element_info(self::$formId);
+    $this->assertEqual($element_info, self::$formInfo[self::$formId]['elements']);
   }
 
   /**
    * Tests rules_forms_get_element_ids().
    */
   public function testGetElementIds() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    $element_ids = rules_forms_get_element_ids(self::$_form_id);
-    $this->assertEqual($element_ids, array_keys(self::$_form_info[self::$_form_id]['elements']));
+    variable_set('rules_forms_form_info', self::$formInfo);
+    $element_ids = rules_forms_get_element_ids(self::$formId);
+    $this->assertEqual($element_ids, array_keys(self::$formInfo[self::$formId]['elements']));
   }
 
   /**
    * Tests rules_forms_activate_form().
    */
   public function testActivateForm() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    $form_id = 'activate_test';
-    $form_info = array('label' => 'Activate test', 'elements' => array(), 'buttons' => FALSE);
-    rules_forms_activate_form($form_id, $form_info);
+    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[$form_id], $form_info, 'Ensure the form was activated.');
+    $this->assertEqual($info[$formId], $formInfo, 'Ensure the form was activated.');
   }
 
   /**
@@ -736,46 +819,46 @@ class RulesFormsAPITestCase extends RulesFormsRulesTestCase {
    * Tests rules_forms_event_build().
    */
   public function testEventBuild() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    $form_id = self::$_form['form_id']['#value'];
-    rules_forms_event_build(self::$_form, self::$_form_state, $form_id);
-    foreach (self::$_form_info[$form_id]['elements'] as $element_id => $info) {
-      $this->assertTrue(isset($_SESSION['rules_forms_form_values'][$form_id][$element_id]), 'Ensure the session variable was set for the element.');
-      // Values should always be 'tset' whether it came from #value or #default_value.
-      $this->assertTrue($_SESSION['rules_forms_form_values'][$form_id][$element_id] == 'tset');
+    variable_set('rules_forms_form_info', self::$formInfo);
+    $formId = self::$form['form_id']['#value'];
+    rules_forms_event_build(self::$form, self::$formState, $formId);
+    foreach (self::$formInfo[$formId]['elements'] as $element_id => $info) {
+      $this->assertTrue(isset($_SESSION['rules_forms_form_values'][$formId][$element_id]), 'Ensure the session variable was set for the element.');
+      // Values should always be 'test' whether it came from.
+      $this->assertTrue($_SESSION['rules_forms_form_values'][$formId][$element_id] == 'test');
     }
   }
-  
-  /**
-   * Tests rules_forms_event_submit().
-   */
+
+  /**
+   * Tests rules_forms_event_submit().
+   */
   public function testEventSubmit() {
-    variable_set('rules_forms_form_info', self::$_form_info);
-    // Ensure that the session variables are unset for the form.
-    $form_id = self::$_form['form_id']['#value'];
-    $_SESSION['rules_forms_form_values'][$form_id] = array('textfield:title' => 'tset', 'textarea:body:und:0:value' => 'tset');
-    rules_forms_event_submit(self::$_form, self::$_form_state);
-    $this->assertFalse(isset($_SESSION['rules_forms_form_values'][$form_id]), 'Ensure the session variable is unset.');
+    variable_set('rules_forms_form_info', self::$formInfo);
+    // Ensure that the session variables are unset for the form.
+    $formId = self::$form['form_id']['#value'];
+    $_SESSION['rules_forms_form_values'][$formId] = array('textfield:title' => 'test', 'textarea:body:und:0:value' => 'test');
+    rules_forms_event_submit(self::$form, self::$formState);
+    $this->assertFalse(isset($_SESSION['rules_forms_form_values'][$formId]), 'Ensure the session variable is unset.');
   }
 
   /**
    * Tests rules_forms_event_button_submit().
    */
   public function testEventButtonSubmit() {
-    // Add the button to the $form_info array.
-    $form_info = self::$_form_info;
-    $form_info[self::$_form_id]['submit']['fieldset:button:test'] = array();
-    variable_set('rules_forms_form_info', $form_info);
+    // Add the button to the $formInfo array.
+    $formInfo = self::$formInfo;
+    $formInfo[self::$formId]['submit']['fieldset:button:test'] = array();
+    variable_set('rules_forms_form_info', $formInfo);
 
     // Indicate that this button was clicked.
-    $form_id = self::$_form['form_id']['#value'];
-    $form_state = self::$_form_state;
-    $form_state['triggering_element'] = array('#rules_forms_element_id' => 'fieldset:button:test');
-    
+    $formId = self::$form['form_id']['#value'];
+    $formState = self::$formState;
+    $formState['triggering_element'] = array('#rules_forms_element_id' => 'fieldset:button:test');
+
     // Ensure that the session variables are unset for the form.
-    $_SESSION['rules_forms_form_values'][$form_id] = array('textfield:title' => 'tset', 'textarea:body:und:0:value' => 'tset');
-    rules_forms_event_button_submit(self::$_form, $form_state);
-    $this->assertFalse(isset($_SESSION['rules_forms_form_values'][$form_id]), 'Ensure the session variable is unset.');
+    $_SESSION['rules_forms_form_values'][$formId] = array('textfield:title' => 'test', 'textarea:body:und:0:value' => 'test');
+    rules_forms_event_button_submit(self::$form, $formState);
+    $this->assertFalse(isset($_SESSION['rules_forms_form_values'][$formId]), 'Ensure the session variable is unset.');
   }
 
 }
