diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php index 8b9852c..6b67975 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php @@ -66,10 +66,13 @@ public function testUrlInfo($entity_class, $link_template, $expected, $langcode $this->assertEquals($langcode, $uri->getOption('language')->getId()); } else { - // The expected langcode for a config entity is 'en', because it sets the - // value as default property. - $expected_langcode = $entity instanceof ConfigEntityInterface ? 'en' : LanguageInterface::LANGCODE_NOT_SPECIFIED; - $this->assertEquals($expected_langcode, $uri->getOption('language')->getId()); + if ($entity instanceof ConfigEntityInterface) { + // Config entities do not provide a language with their URIs. + $this->assertEquals(NULL, $uri->getOption('language')); + } + else { + $this->assertEquals(LanguageInterface::LANGCODE_NOT_SPECIFIED, $uri->getOption('language')->getId()); + } } }