| 7 shortcut.test | ShortcutSetsTestCase::testShortcutSetRenameAlreadyExists() |
| 8 shortcut.test | ShortcutSetsTestCase::testShortcutSetRenameAlreadyExists() |
Tests renaming a shortcut set to the same name as another set.
File
- modules/
shortcut/ shortcut.test, line 329 - Tests for shortcut.module.
Code
function testShortcutSetRenameAlreadyExists() {
$set = $this->generateShortcutSet($this->randomName(10));
$existing_title = $this->set->title;
$this->drupalPost('admin/config/user-interface/shortcut/' . $set->set_name . '/edit', array('title' => $existing_title), t('Save'));
$this->assertRaw(t('The shortcut set %name already exists. Choose another name.', array('%name' => $existing_title)));
$set = shortcut_set_load($set->set_name);
$this->assertNotEqual($set->title, $existing_title, t('The shortcut set %title cannot be renamed to %new-title because a shortcut set with that title already exists.', array('%title' => $set->title, '%new-title' => $existing_title)));
}
Login or register to post comments