diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php index 213aeaa6de..b8b7d42486 100644 --- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php +++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php @@ -585,12 +585,18 @@ public function testDetailsTitleIsNotEscaped() { */ public function testUrlPrefixOnLanguageNeutralContent() { $this->drupalLogin($this->administrator); - $article = $this->drupalCreateNode(['type' => 'article', 'langcode' => 'und']); - $this->drupalGet("{$this->langcodes[1]}/admin/content"); - $this->assertSession()->linkByHrefExists("{$this->langcodes[1]}/node/{$article->id()}"); + $neutral_langcodes = [ + LanguageInterface::LANGCODE_NOT_APPLICABLE, + LanguageInterface::LANGCODE_NOT_SPECIFIED, + ]; + foreach ($neutral_langcodes as $langcode) { + $article = $this->drupalCreateNode(['type' => 'article', 'langcode' => $langcode]); + $this->drupalGet("{$this->langcodes[1]}/admin/content"); + $this->assertSession()->linkByHrefExists("{$this->langcodes[1]}/node/{$article->id()}"); - $this->drupalGet("{$this->langcodes[2]}/admin/content"); - $this->assertSession()->linkByHrefExists("{$this->langcodes[2]}/node/{$article->id()}"); + $this->drupalGet("{$this->langcodes[2]}/admin/content"); + $this->assertSession()->linkByHrefExists("{$this->langcodes[2]}/node/{$article->id()}"); + } } }