function ShortcutSetsTestCase::testShortcutSetAdd in Drupal 7
Tests creating a shortcut set.
File
- modules/
shortcut/ shortcut.test, line 243 - Tests for shortcut.module.
Class
- ShortcutSetsTestCase
- Defines shortcut set test cases.
Code
function testShortcutSetAdd() {
$new_set = $this
->generateShortcutSet($this
->randomName(10));
$sets = shortcut_sets();
$this
->assertTrue(isset($sets[$new_set->set_name]), 'Successfully created a shortcut set.');
$this
->drupalGet('user/' . $this->admin_user->uid . '/shortcuts');
$this
->assertText($new_set->title, 'Generated shortcut set was listed as a choice on the user account page.');
}