diff --git a/core/modules/shortcut/src/Tests/ShortcutTranslationUITest.php b/core/modules/shortcut/src/Tests/ShortcutTranslationUITest.php index 5cb5a55..1627b60 100644 --- a/core/modules/shortcut/src/Tests/ShortcutTranslationUITest.php +++ b/core/modules/shortcut/src/Tests/ShortcutTranslationUITest.php @@ -61,14 +61,11 @@ protected function doTestBasicTranslation() { foreach ($this->langcodes as $langcode) { if ($entity->hasTranslation($langcode)) { $language = new Language(array('id' => $langcode)); + // Request the front page in this language and assert that the right + // translation shows up in the shortcut list with the right path. $this->drupalGet('', array('language' => $language)); $expected_path = \Drupal::urlGenerator()->generateFromRoute('user.page', array(), array('language' => $language)); $label = $entity->getTranslation($langcode)->label(); - - debug($this->drupalGetContent()); - debug($label); - debug($expected_path); - $elements = $this->xpath('//nav[contains(@class, "toolbar-lining")]/ul[@class="menu"]/li/a[contains(@href, :href) and normalize-space(text())=:label]', array(':href' => $expected_path, ':label' => $label)); $this->assertTrue(!empty($elements), format_string('Translated @language shortcut link @label found.', array('@label' => $label, '@language' => $language->getName()))); }