Tests switching a user's shortcut set and creating one at the same time.
function testShortcutSetSwitchCreate() {
$edit = array(
'set' => 'new',
'id' => strtolower($this
->randomName()),
'label' => $this
->randomString(),
);
$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
->id(), $this->set
->id(), 'A shortcut set can be switched to at the same time as it is created.');
$this
->assertEqual($current_set
->label(), $edit['label'], 'The new set is correctly assigned to the user.');
}