function ShortcutSetsTestCase::testShortcutSetSwitchCreate
Tests switching a user's shortcut set and creating one at the same time.
File
-
modules/
shortcut/ shortcut.test, line 279
Class
- ShortcutSetsTestCase
- Defines shortcut set test cases.
Code
function testShortcutSetSwitchCreate() {
$edit = array(
'set' => 'new',
'new' => $this->randomName(10),
);
$this->drupalPost('user/' . $this->admin_user->uid . '/shortcuts', $edit, t('Change set'));
$current_set = shortcut_current_displayed_set($this->admin_user);
$this->assertNotEqual($current_set->set_name, $this->set->set_name, 'A shortcut set can be switched to at the same time as it is created.');
$this->assertEqual($current_set->title, $edit['new'], 'The new set is correctly assigned to the user.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.