function CCKSelectOtherBasicTest::testFailValidationForm in CCK Select Other 6
Same name and namespace in other branches
- 7.2 tests/cck_select_other.test \CCKSelectOtherBasicTest::testFailValidationForm()
- 7 tests/cck_select_other.test \CCKSelectOtherBasicTest::testFailValidationForm()
Fail validation of node edit form, check option values
File
- tests/
cck_select_other.test, line 201 - test file for cck_select_other Testing file
Class
- CCKSelectOtherBasicTest
- @class CCK Select Other Basic Test Case
Code
function testFailValidationForm() {
$my_text_option = '';
$edit = array(
'title' => '',
'body' => $this->test_node->body,
'field_blah[select_other_list]' => 'other',
'field_blah[select_other_text_input]' => $this
->randomName(16),
);
$my_text_option = $edit['field_blah[select_other_text_input]'];
$this
->drupalPost('node/' . $this->test_node->nid . '/edit', $edit, t('Save'));
$this
->assertFieldById('edit-field-blah-select-other-list', 'other', t('Select field value matches'));
$this
->assertFieldById('edit-field-blah-select-other-text-input', $my_text_option, t('Text input field value matches'));
}