summaryrefslogtreecommitdiffstats
path: root/core/modules/shortcut/src/Tests/ShortcutSetsTest.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-05-20 09:29:40 (GMT)
committerNathaniel Catchpole2014-05-20 09:29:40 (GMT)
commitc972b3ee9d6ef7d1554480ea95d0bcc623d01c77 (patch)
treecd99a0eb05894994a5612d59067cce0b3d7f361c /core/modules/shortcut/src/Tests/ShortcutSetsTest.php
parent21fbb5ddaffc925ed58f8086d0bf90e44845d4b3 (diff)
Issue #2190313 by pfrenssen, Berdir, amateescu, ianthomas_uk: Add $EntityType::load() and loadMultiple() to simplify loading entities.
Diffstat (limited to 'core/modules/shortcut/src/Tests/ShortcutSetsTest.php')
-rw-r--r--core/modules/shortcut/src/Tests/ShortcutSetsTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php
index 2a31535..c17316d 100644
--- a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php
+++ b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php
@@ -6,6 +6,7 @@
*/
namespace Drupal\shortcut\Tests;
+use Drupal\shortcut\Entity\ShortcutSet;
/**
* Defines shortcut set test cases.
@@ -98,7 +99,7 @@ class ShortcutSetsTest extends ShortcutTestBase {
$this->drupalGet('admin/config/user-interface/shortcut');
$this->clickLink(t('Edit shortcut set'));
$this->drupalPostForm(NULL, array('label' => $new_label), t('Save'));
- $set = shortcut_set_load($set->id());
+ $set = ShortcutSet::load($set->id());
$this->assertTrue($set->label() == $new_label, 'Shortcut set has been successfully renamed.');
}
@@ -110,7 +111,7 @@ class ShortcutSetsTest extends ShortcutTestBase {
$existing_label = $this->set->label();
$this->drupalPostForm('admin/config/user-interface/shortcut/manage/' . $set->id(), array('label' => $existing_label), t('Save'));
$this->assertRaw(t('The shortcut set %name already exists. Choose another name.', array('%name' => $existing_label)));
- $set = shortcut_set_load($set->id());
+ $set = ShortcutSet::load($set->id());
$this->assertNotEqual($set->label(), $existing_label, format_string('The shortcut set %title cannot be renamed to %new-title because a shortcut set with that title already exists.', array('%title' => $set->label(), '%new-title' => $existing_label)));
}