function ShortcutTestCase::generateShortcutSet
7.x shortcut.test | ShortcutTestCase::generateShortcutSet($title = '', $default_links = TRUE) |
Creates a generic shortcut set.
6 calls to ShortcutTestCase::generateShortcutSet()
- 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::testShortcutSetDelete in drupal-7.x/
modules/ shortcut/ shortcut.test - Tests deleting a shortcut set.
- ShortcutSetsTestCase::testShortcutSetRenameAlreadyExists in drupal-7.x/
modules/ shortcut/ shortcut.test - Tests renaming a shortcut set to the same name as another set.
- ShortcutSetsTestCase::testShortcutSetSwitchOwn in drupal-7.x/
modules/ shortcut/ shortcut.test - Tests switching a user's own shortcut set.
File
- drupal-7.x/
modules/ shortcut/ shortcut.test, line 51 - Tests for shortcut.module.
Class
- ShortcutTestCase
- Defines base class for shortcut test cases.
Code
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;
}