You are here

protected function LinkSanitizeTest::generateParams in Link 7

Generate parameters for testing _link_sanitize().

9 calls to LinkSanitizeTest::generateParams()
LinkSanitizeTest::testAbsoluteHash in tests/LinkSanitizeTest.test
Test that relative hash URLs can be turned into absolute URLs.
LinkSanitizeTest::testAbsoluteQuery in tests/LinkSanitizeTest.test
Test that query URLs can be turned into absolute URLs.
LinkSanitizeTest::testBlankTitle in tests/LinkSanitizeTest.test
Test that query URLs can be turned into absolute URLs.
LinkSanitizeTest::testBlankTitleWithFragment in tests/LinkSanitizeTest.test
Test that query URLs can be turned into absolute URLs.
LinkSanitizeTest::testBlankTitleWithMultipleQueries in tests/LinkSanitizeTest.test
Test that multiple query URLs can be turned into absolute URLs.

... See full list

File

tests/LinkSanitizeTest.test, line 49

Class

LinkSanitizeTest
Test for _link_sanitize().

Code

protected function generateParams($settings = array()) {
  $field = array();
  $instance['entity_type'] = 'node';
  $defaults['attributes'] = array();
  $defaults['display']['url_cutoff'] = 20;
  $defaults['title'] = 'Test title';
  $settings += $defaults;
  $settings['display'] += $defaults['display'];
  $instance['settings'] = $settings;
  $entity = NULL;
  return array(
    $field,
    $instance,
    $entity,
  );
}