function autocompleteWidgetsBaseTest::xssTest in Autocomplete Widgets for Text and Number Fields 7
Tests the functionality of the "xss filter" option.
4 calls to autocompleteWidgetsBaseTest::xssTest()
- autocompleteWidgetsAllowedValuesTest::testAllowedValues in tests/
autocomplete_widgets.test - autocompleteWidgetsFieldDataTest::testFieldData in tests/
autocomplete_widgets.test - autocompleteWidgetsNodeReferenceTest::testNodeTitles in tests/
autocomplete_widgets.test - autocompleteWidgetsSuggestedValuesTest::testSuggestedValues in tests/
autocomplete_widgets.test
File
- tests/
autocomplete_widgets.test, line 100
Class
Code
function xssTest($instance) {
$settings = $this->settings;
$settings['autocomplete_xss'] = 1;
$instance['widget']['settings'] = $settings;
field_update_instance($instance);
$this
->drupalGet($this->path . 'foo');
$this
->assertRaw('"bazfoo"', 'A suggestion was returned with HTML stripped out.');
}