diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php index 7f1c62b..6bc3a2c 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php @@ -31,7 +31,7 @@ function testShortcutLinkAdd() { 'source' => 'node/' . $this->node->nid, 'alias' => $this->randomName(8), ); - \Drupal::service('path.crud')->save($path['source'], $path['alias']); + $this->container->get('path.crud')->save($path['source'], $path['alias']); // Create some paths to test. $test_cases = array( @@ -54,7 +54,7 @@ function testShortcutLinkAdd() { $saved_set = shortcut_set_load($set->id()); $paths = $this->getShortcutInformation($saved_set, 'link_path'); $test_path = empty($test['path']) ? '' : $test['path']; - $this->assertTrue(in_array(\Drupal::service('path.alias_manager')->getSystemPath($test_path), $paths), 'Shortcut created: '. $test['path']); + $this->assertTrue(in_array($this->container->get('path.alias_manager')->getSystemPath($test_path), $paths), 'Shortcut created: '. $test['path']); $this->assertLink($title, 0, 'Shortcut link found on the page.'); } }