diff --git a/core/modules/locale/lib/Drupal/locale/Locale.php b/core/modules/locale/lib/Drupal/locale/Locale.php index f4f41c1..1d02d14 100644 --- a/core/modules/locale/lib/Drupal/locale/Locale.php +++ b/core/modules/locale/lib/Drupal/locale/Locale.php @@ -25,6 +25,6 @@ class Locale { * @return \Drupal\locale\LocaleConfigManager */ public static function config() { - return Drupal::service('locale.config.typed'); + return \Drupal::service('locale.config.typed'); } } diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php index a6fb1c5..b40ac2d 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php @@ -110,13 +110,13 @@ function testPathLanguageConfiguration() { 'alias' => $custom_path, 'langcode' => Language::LANGCODE_NOT_SPECIFIED, ); - drupal_container()->get('path.crud')->save($edit['source'], $edit['alias'], $edit['langcode']); - $lookup_path = drupal_container()->get('path.alias_manager')->getPathAlias('node/' . $node->nid, 'en'); + \Drupal::service('path.crud')->save($edit['source'], $edit['alias'], $edit['langcode']); + $lookup_path = \Drupal::service('path.alias_manager')->getPathAlias('node/' . $node->nid, 'en'); $this->assertEqual($english_path, $lookup_path, t('English language alias has priority.')); // Same check for language 'xx'. - $lookup_path = drupal_container()->get('path.alias_manager')->getPathAlias('node/' . $node->nid, $prefix); + $lookup_path = \Drupal::service('path.alias_manager')->getPathAlias('node/' . $node->nid, $prefix); $this->assertEqual($custom_language_path, $lookup_path, t('Custom language alias has priority.')); - drupal_container()->get('path.crud')->delete($edit); + \Drupal::service('path.crud')->delete($edit); // Create language nodes to check priority of aliases. $first_node = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1)); @@ -128,7 +128,7 @@ function testPathLanguageConfiguration() { 'alias' => $custom_path, 'langcode' => 'en', ); - drupal_container()->get('path.crud')->save($edit['source'], $edit['alias'], $edit['langcode']); + \Drupal::service('path.crud')->save($edit['source'], $edit['alias'], $edit['langcode']); // Assign a custom path alias to second node with Language::LANGCODE_NOT_SPECIFIED. $edit = array( @@ -136,7 +136,7 @@ function testPathLanguageConfiguration() { 'alias' => $custom_path, 'langcode' => Language::LANGCODE_NOT_SPECIFIED, ); - drupal_container()->get('path.crud')->save($edit['source'], $edit['alias'], $edit['langcode']); + \Drupal::service('path.crud')->save($edit['source'], $edit['alias'], $edit['langcode']); // Test that both node titles link to our path alias. $this->drupalGet('');