diff --git a/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php b/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php index 0653743..9d763b7 100644 --- a/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php +++ b/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php @@ -67,6 +67,9 @@ function setUp() { ); $this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save')); + // Reset cache. + \Drupal::entityManager()->getStorageController('node')->resetCache(); + // Ensure configuration changes are picked up in the host environment. Field::fieldInfo()->flush(); $field = Field::fieldInfo()->getField('node', 'body'); @@ -139,6 +142,9 @@ function testAliasTranslation() { $edit = array('preferred_langcode' => 'fr'); $this->drupalPostForm("user/" . $this->web_user->id() . "/edit", $edit, t('Save')); + // Reset cache. + \Drupal::entityManager()->getStorageController('node')->resetCache(); + // Check that the English alias works. In this situation French is the // current UI and content language, while URL language is English (since we // do not have a path prefix we fall back to the site's default language).