Commit 109b8959 authored by alexpott's avatar alexpott

Issue #2322063 by Temoor: Replace all instances of shortcut_set_load(),...

Issue #2322063 by Temoor: Replace all instances of shortcut_set_load(), entity_load('shortcut_set') and entity_load_multiple('shortcut_set') with static method calls.
parent 34c75100
......@@ -249,7 +249,7 @@ function shortcut_default_set($account = NULL) {
* TRUE if a shortcut set with that title exists; FALSE otherwise.
*/
function shortcut_set_title_exists($title) {
$sets = entity_load_multiple('shortcut_set');
$sets = ShortcutSet::loadMultiple();
foreach ($sets as $set) {
if ($set->label == $title) {
return TRUE;
......
......@@ -129,7 +129,7 @@ function testShortcutSetDelete() {
$new_set = $this->generateShortcutSet($this->randomMachineName());
$this->drupalPostForm('admin/config/user-interface/shortcut/manage/' . $new_set->id() . '/delete', array(), t('Delete'));
$sets = entity_load_multiple('shortcut_set');
$sets = ShortcutSet::loadMultiple();
$this->assertFalse(isset($sets[$new_set->id()]), 'Successfully deleted a shortcut set.');
}
......@@ -147,7 +147,7 @@ function testShortcutSetDeleteDefault() {
function testShortcutSetCreateWithSetName() {
$random_name = $this->randomMachineName();
$new_set = $this->generateShortcutSet($random_name, $random_name);
$sets = entity_load_multiple('shortcut_set');
$sets = ShortcutSet::loadMultiple();
$this->assertTrue(isset($sets[$random_name]), 'Successfully created a shortcut set with a defined set name.');
$this->drupalGet('user/' . $this->admin_user->id() . '/shortcuts');
$this->assertText($new_set->label(), 'Generated shortcut set was listed as a choice on the user account page.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment