protected function MultipleValuesWidgetTest::checkExistingValidationExpectation in Inline Entity Form 7
Checks that an invalid value for an existing node will be display the expected error.
Parameters
$existing_node_text: The text to enter into the existing node text field.
$expected_error: The error message that is expected to be shown.
File
- tests/
multiple_values_widget.test, line 684
Class
- MultipleValuesWidgetTest
- IEF multiple values field widget tests.
Code
protected function checkExistingValidationExpectation($existing_node_text, $expected_error) {
$edit = array(
'field_multiple_nodes[und][form][entity_id]' => $existing_node_text,
);
$this
->openMultiExistingForm();
$this
->drupalPostAjax(NULL, $edit, $this
->getButtonName('//input[@type="submit" and @id="edit-field-multiple-nodes-und-form-actions-ief-reference-save"]'));
$this
->assertText($expected_error);
$this
->cancelExistingMultiForm($edit);
}