function ShortcutSetsTestCase::testShortcutSetAssign

7.x shortcut.test ShortcutSetsTestCase::testShortcutSetAssign()

Tests switching another user's shortcut set.

File

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

Class

ShortcutSetsTestCase
Defines shortcut set test cases.

Code

function testShortcutSetAssign() {
  $new_set = $this->generateShortcutSet($this->randomName(10));

  shortcut_set_assign_user($new_set, $this->shortcut_user);
  $current_set = shortcut_current_displayed_set($this->shortcut_user);
  $this->assertTrue($new_set->set_name == $current_set->set_name, "Successfully switched another user's shortcut set.");
}