function ShortcutTestCase::generateShortcutSet

Creates a generic shortcut set.

12 calls to ShortcutTestCase::generateShortcutSet()
ShortcutSetsTestCase::testShortcutSetAdd in drupal-7.x/modules/shortcut/shortcut.test
Tests creating a shortcut set.
ShortcutSetsTestCase::testShortcutSetAdd in drupal-7.x/modules/shortcut/shortcut.test
Tests creating a shortcut set.
ShortcutSetsTestCase::testShortcutSetAssign in drupal-7.x/modules/shortcut/shortcut.test
Tests switching another user's shortcut set.
ShortcutSetsTestCase::testShortcutSetAssign in drupal-7.x/modules/shortcut/shortcut.test
Tests switching another user's shortcut set.
ShortcutSetsTestCase::testShortcutSetDelete in drupal-7.x/modules/shortcut/shortcut.test
Tests deleting a shortcut set.

... See full list

Archivo

drupal-7.x/modules/shortcut/shortcut.test, line 51
Tests for shortcut.module.

Class

ShortcutTestCase
Defines base class for shortcut test cases.

Código

function generateShortcutSet($title = '', $default_links = TRUE) {
  $set = new stdClass();
  $set->title = empty($title) ? $this->randomName(10) : $title;
  if ($default_links) {
    $set->links = array();
    $set->links[] = $this->generateShortcutLink('node/add');
    $set->links[] = $this->generateShortcutLink('admin/content');
  }
  shortcut_set_save($set);

  return $set;
}