diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php index 95c9a30..55a0114 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php @@ -84,7 +84,7 @@ function testLookupPath() { $this->fixtures->createTables($connection); //Create AliasManager and Path object. - $aliasManager = $this->container->get('path.alias_manager'); + $aliasManager = $this->container->get('path.alias_manager.cached'); $pathObject = new Path($connection, $this->container->get('module_handler')); // Test the situation where the source is the same for multiple aliases. @@ -106,7 +106,7 @@ function testLookupPath() { ); $pathObject->save($path['source'], $path['alias'], $path['langcode']); // Hook that clears cache is not executed with unit tests. - $aliasManager->cacheClear(); + \Drupal::service('path.alias_manager.cached')->cacheClear(); $this->assertEqual($aliasManager->getPathAlias($path['source']), $path['alias'], 'English alias overrides language-neutral alias.'); $this->assertEqual($aliasManager->getSystemPath($path['alias']), $path['source'], 'English source overrides language-neutral source.'); diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 3031154..3ef4398 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3149,19 +3149,19 @@ function system_admin_paths() { * Implements hook_path_update(). */ function system_path_update() { - \Drupal::service('path.alias_manager')->cacheClear(); + \Drupal::service('path.alias_manager.cached')->cacheClear(); } /** * Implements hook_path_insert(). */ function system_path_insert() { - \Drupal::service('path.alias_manager')->cacheClear(); + \Drupal::service('path.alias_manager.cached')->cacheClear(); } /** * Implements hook_path_delete(). */ function system_path_delete($path) { - \Drupal::service('path.alias_manager')->cacheClear(); + \Drupal::service('path.alias_manager.cached')->cacheClear(); }