Tests that changing the path of a shortcut link works.
function testShortcutLinkChangePath() {
$set = $this->set;
// Tests changing a shortcut path.
$new_link_path = 'admin/config';
$link = reset($set->links);
$this
->drupalPost('admin/config/user-interface/shortcut/link/' . $link->mlid, array(
'shortcut_link[link_title]' => $link->link_title,
'shortcut_link[link_path]' => $new_link_path,
), t('Save'));
$saved_set = shortcut_set_load($set
->id());
$paths = $this
->getShortcutInformation($saved_set, 'link_path');
$this
->assertTrue(in_array($new_link_path, $paths), 'Shortcut path changed: ' . $new_link_path);
$this
->assertLinkByHref($new_link_path, 0, 'Shortcut with new path appears on the page.');
}