Loading tests/scriptfield.test +14 −0 Changes for tests/scriptfield.test: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -114,6 +114,20 @@ class ScriptFieldFieldTestCase extends DrupalWebTestCase { $this->drupalPost(NULL, $edit, t('Save')); $this->assertText(t('You can not include .. in the URL.')); } $non_allowed_chars = array( 'good.js"><script href="bad.js', '"bad".js', ); foreach ($non_allowed_chars as $wrong_entry) { $this->drupalGet('test-entity/add/test-bundle'); $edit = array( "{$this->field['field_name']}[$langcode][0][value]" => $wrong_entry, ); $this->drupalPost(NULL, $edit, t('Save')); $this->assertText(t('The specified file name is not valid, please use only alphanumeric characters, "/", "-", "_" or "."')); } } /** Loading Loading
tests/scriptfield.test +14 −0 Changes for tests/scriptfield.test: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -114,6 +114,20 @@ class ScriptFieldFieldTestCase extends DrupalWebTestCase { $this->drupalPost(NULL, $edit, t('Save')); $this->assertText(t('You can not include .. in the URL.')); } $non_allowed_chars = array( 'good.js"><script href="bad.js', '"bad".js', ); foreach ($non_allowed_chars as $wrong_entry) { $this->drupalGet('test-entity/add/test-bundle'); $edit = array( "{$this->field['field_name']}[$langcode][0][value]" => $wrong_entry, ); $this->drupalPost(NULL, $edit, t('Save')); $this->assertText(t('The specified file name is not valid, please use only alphanumeric characters, "/", "-", "_" or "."')); } } /** Loading