1 field_ui.test FieldUIManageFieldsTestCase::testExternalDestinations()

Tests that external URLs in the 'destinations' query parameter are blocked.

File

core/modules/field_ui/tests/field_ui.test, line 541
Tests for field_ui.module.

Class

FieldUIManageFieldsTestCase
Tests the functionality of the 'Manage fields' screen.

Code

function testExternalDestinations() {
  $path = 'admin/structure/types/manage/post/fields/field_tags/field-settings';
  $options = array(
    'query' => array('destinations' => array('http://example.com')),
  );
  $this->backdropPost($path, NULL, t('Save field settings'), $options);

  $this->assertUrl('admin/structure/types/manage/post/fields', array(), 'Stayed on the same site.');
}