diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php index ca43c17..ffb4016 100644 --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php @@ -61,8 +61,7 @@ public function testShortcutLinkAdd() { $this->assertResponse(200); $saved_set = ShortcutSet::load($set->id()); $paths = $this->getShortcutInformation($saved_set, 'link'); - $test_path = $test_path != '' ? 'user-path://' . $test_path : ''; - $this->assertTrue(in_array($test_path, $paths), 'Shortcut created: ' . $test_path); + $this->assertTrue(in_array('user-path://' . $test_path, $paths), 'Shortcut created: ' . $test_path); $this->assertLink($title, 0, String::format('Shortcut link %url found on the page.', ['%url' => $test_path])); } $saved_set = ShortcutSet::load($set->id()); @@ -158,7 +157,7 @@ public function testShortcutLinkChangePath() { $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id(), array('title[0][value]' => $shortcut->getTitle(), 'link[0][uri]' => $new_link_path), t('Save')); $saved_set = ShortcutSet::load($set->id()); $paths = $this->getShortcutInformation($saved_set, 'link'); - $this->assertTrue(in_array($new_link_path, $paths), 'Shortcut path changed: ' . $new_link_path); + $this->assertTrue(in_array('user-path://' . $new_link_path, $paths), 'Shortcut path changed: ' . $new_link_path); $this->assertLinkByHref($new_link_path, 0, 'Shortcut with new path appears on the page.'); } diff --git a/core/modules/shortcut/src/Tests/ShortcutTestBase.php b/core/modules/shortcut/src/Tests/ShortcutTestBase.php index 99a092b..63e119a 100644 --- a/core/modules/shortcut/src/Tests/ShortcutTestBase.php +++ b/core/modules/shortcut/src/Tests/ShortcutTestBase.php @@ -66,7 +66,7 @@ protected function setUp() { 'title' => t('Add content'), 'weight' => -20, 'link' => array( - 'uri' => 'node/add', + 'uri' => 'user-path://node/add', ), )); $shortcut->save(); @@ -76,7 +76,7 @@ protected function setUp() { 'title' => t('All content'), 'weight' => -19, 'link' => array( - 'uri' => 'admin/content', + 'uri' => 'user-path://admin/content', ), )); $shortcut->save();