public function RulesFormsActionsTestCase::testSetTitleAction in Rules Forms Support 7
Tests callback for Action: Set element title.
File
- ./
rules_forms.test, line 531 - Stores tests related to Rules Form.
Class
- RulesFormsActionsTestCase
- Tests Rules Forms actions.
Code
public function testSetTitleAction() {
$form = array();
$form['test'] = array(
'#type' => 'textfield',
'#title' => 'tset',
);
$form = new ArrayObject($form);
$action = rules_action('rules_forms_set_title', array(
'element' => 'textfield:test',
'title' => 'test',
));
$action
->executeByArgs(array(
'form' => $form,
));
$this
->assertEqual($form['test']['#title'], 'test');
}