You are here

function ShortcutSetsTestCase::testShortcutSetRename in Drupal 7

Tests renaming a shortcut set.

File

modules/shortcut/shortcut.test, line 319
Tests for shortcut.module.

Class

ShortcutSetsTestCase
Defines shortcut set test cases.

Code

function testShortcutSetRename() {
  $set = $this->set;
  $new_title = $this
    ->randomName(10);
  $this
    ->drupalPost('admin/config/user-interface/shortcut/' . $set->set_name . '/edit', array(
    'title' => $new_title,
  ), t('Save'));
  $set = shortcut_set_load($set->set_name);
  $this
    ->assertTrue($set->title == $new_title, 'Shortcut set has been successfully renamed.');
}