diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php index f083d9e839..358a8b7a0f 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php @@ -77,10 +77,8 @@ public function testMapperListPage() { // Make sure there is only a single operation for each dropbutton, either // 'List' or 'Translate'. foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) { - $this->assertIdentical(1, $dropbutton->count()); - foreach ($dropbutton->li as $link) { - $this->assertTrue(((string) $link->a === 'Translate') || ((string) $link->a === 'List')); - } + $this->assertIdentical(1, substr_count($dropbutton->getHtml(), '')); + $this->assertTrue(($dropbutton->getText() === 'Translate') || ($dropbutton->getText() === 'List')); } $labels = [ @@ -104,10 +102,8 @@ public function testMapperListPage() { // Make sure there is only a single 'Translate' operation for each // dropbutton. foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) { - $this->assertIdentical(1, $dropbutton->count()); - foreach ($dropbutton->li as $link) { - $this->assertIdentical('Translate', (string) $link->a); - } + $this->assertIdentical(1, substr_count($dropbutton->getHtml(), '')); + $this->assertIdentical('Translate', $dropbutton->getText()); } $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId()); diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php index f9e73a7092..dcfb7916fe 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php @@ -65,7 +65,7 @@ public function testThemeDiscovery() { ':label' => 'Install and set as default', ':theme' => $theme, ]); - $this->drupalGet($GLOBALS['base_root'] . $elements[0]['href'], ['external' => TRUE]); + $this->drupalGet($GLOBALS['base_root'] . $elements[0]->getAttribute('href'), ['external' => TRUE]); $translation_base_url = 'admin/config/development/performance/translate'; $this->drupalGet($translation_base_url);