1.20.x link.validate.test | LinkValidateTest::testBadUrlValidationOff() |
Test if we can post a bad URL if the validation is expressly turned off.
File
- modules/
link/ tests/ link.validate.test, line 78 - Tests that exercise the validation functions in the link module.
Class
Code
function testBadUrlValidationOff() {
// Disable validation.
$edit = array(
'instance[settings][validate_url]' => FALSE,
);
$this->backdropPost('admin/structure/types/manage/page/fields/' . $this->field_name, $edit, t('Save settings'));
$edit = array(
'title' => 'Simple Title',
$this->field_name . '[und][0][url]' => 'edik:naw',
);
$this->backdropPost('node/add/page', $edit, t('Save'));
$this->assertNoText(t('The value %value provided for %field is not a valid URL.', array('%field' => $this->field_name, '%value' => 'edik:naw')));
}