diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php index ac834d1..ea732c5 100644 --- a/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php +++ b/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php @@ -59,7 +59,7 @@ function testLanguageBlock() { $this->assertText($block->label(), 'Language switcher block found.'); // Assert that only the current language is marked as active. - list($language_switcher) = $this->xpath('//div[@id=:id]/div[@class="content"]', array(':id' => 'block-test-language-block')); + $language_switcher_item = $this->xpath('//div[@id=:id]//li', array(':id' => 'block-test-language-block')); $links = array( 'active' => array(), 'inactive' => array(), @@ -68,7 +68,7 @@ function testLanguageBlock() { 'active' => array(), 'inactive' => array(), ); - foreach ($language_switcher->ul->li as $link) { + foreach ($language_switcher_item as $link) { $classes = explode(" ", (string) $link['class']); list($langcode) = array_intersect($classes, array('en', 'fr')); if (in_array('active', $classes)) {