function ShortcutSetsTestCase::testShortcutSetSwitchNoSetName

Tests switching a user's shortcut set without providing a new set name.

File

modules/shortcut/shortcut.test, line 293

Class

ShortcutSetsTestCase
Defines shortcut set test cases.

Code

function testShortcutSetSwitchNoSetName() {
  $edit = array(
    'set' => 'new',
  );
  $this->drupalPost('user/' . $this->admin_user->uid . '/shortcuts', $edit, t('Change set'));
  $this->assertText(t('The new set name is required.'));
  $current_set = shortcut_current_displayed_set($this->admin_user);
  $this->assertEqual($current_set->set_name, $this->set->set_name, 'Attempting to switch to a new shortcut set without providing a set name does not succeed.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.