diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationFormTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php similarity index 92% rename from core/modules/config_translation/src/Tests/ConfigTranslationFormTest.php rename to core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php index 387d686460..4698b05a8e 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationFormTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationFormTest.php @@ -1,16 +1,16 @@ 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, count($dropbutton->find('xpath', 'li'))); + $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, count($dropbutton->find('xpath', 'li'))); + $this->assertIdentical('Translate', $dropbutton->getText()); } $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId()); diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiThemeTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php similarity index 86% rename from core/modules/config_translation/src/Tests/ConfigTranslationUiThemeTest.php rename to core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php index 53713a9238..dcfb7916fe 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiThemeTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php @@ -1,16 +1,16 @@ '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);