diff --git a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php similarity index 94% rename from core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php rename to core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php index 3ef0754ea6..09aea507a5 100644 --- a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php +++ b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php @@ -1,15 +1,15 @@ drupalGet('admin/structure/config_test/manage/dotted.default'); $elements = $this->xpath('//input[@name="label"]'); - $this->assertIdentical((string) $elements[0]['value'], $original_label); + $this->assertIdentical((string) $elements[0]->getValue(), $original_label); $this->assertNoText($overridden_label); // Change to a new label and test that the listing now has the edited label. @@ -61,7 +61,7 @@ public function testFormsWithOverrides() { // Test that the editing page now has the edited label. $this->drupalGet('admin/structure/config_test/manage/dotted.default'); $elements = $this->xpath('//input[@name="label"]'); - $this->assertIdentical((string) $elements[0]['value'], $edited_label); + $this->assertIdentical((string) $elements[0]->getValue(), $edited_label); // Test that the overridden label is still loaded with the entity. $this->assertEqual($config_test_storage->load('dotted.default')->label(), $overridden_label); diff --git a/core/modules/config/src/Tests/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php similarity index 96% rename from core/modules/config/src/Tests/ConfigEntityListTest.php rename to core/modules/config/tests/src/Functional/ConfigEntityListTest.php index e9950ea424..69ef79762f 100644 --- a/core/modules/config/src/Tests/ConfigEntityListTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php @@ -1,17 +1,17 @@ $element) { - $this->assertIdentical((string) $element[0], $expected_items[$key]); + $this->assertIdentical($element->getText(), $expected_items[$key]); } // Check the number of table row cells. @@ -178,9 +178,9 @@ public function testListUI() { // Check the contents of each row cell. The first cell contains the label, // the second contains the machine name, and the third contains the // operations list. - $this->assertIdentical((string) $elements[0], 'Default'); - $this->assertIdentical((string) $elements[1], 'dotted.default'); - $this->assertTrue($elements[2]->children()->xpath('//ul'), 'Operations list found.'); + $this->assertIdentical($elements[0]->getText(), 'Default'); + $this->assertIdentical($elements[1]->getText(), 'dotted.default'); + $this->assertNotEmpty($elements[2]->find('xpath', '//ul'), 'Operations list found.'); // Add a new entity using the operations link. $this->assertLink('Add test configuration'); diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php similarity index 99% rename from core/modules/config/src/Tests/ConfigEntityTest.php rename to core/modules/config/tests/src/Functional/ConfigEntityTest.php index c0dc97bc7b..4d0cd3e06e 100644 --- a/core/modules/config/src/Tests/ConfigEntityTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php @@ -1,6 +1,6 @@ drupalGet('admin/config/system/site-information'); $this->assertTitle('Basic site settings | ' . $overridden_name); $elements = $this->xpath('//input[@name="site_name"]'); - $this->assertIdentical((string) $elements[0]['value'], 'Drupal'); + $this->assertIdentical((string) $elements[0]->getValue(), 'Drupal'); // Submit the form and ensure the site name is not changed. $edit = [ @@ -41,7 +41,7 @@ public function testFormsWithOverrides() { $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration')); $this->assertTitle('Basic site settings | ' . $overridden_name); $elements = $this->xpath('//input[@name="site_name"]'); - $this->assertIdentical((string) $elements[0]['value'], $edit['site_name']); + $this->assertIdentical((string) $elements[0]->getValue(), $edit['site_name']); } } diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/tests/src/Functional/ConfigImportAllTest.php similarity index 97% rename from core/modules/config/src/Tests/ConfigImportAllTest.php rename to core/modules/config/tests/src/Functional/ConfigImportAllTest.php index 459be7a24f..0608681dd7 100644 --- a/core/modules/config/src/Tests/ConfigImportAllTest.php +++ b/core/modules/config/tests/src/Functional/ConfigImportAllTest.php @@ -1,12 +1,13 @@ drupalGet('admin/appearance'); $url = $this->xpath("//a[contains(@href,'config_clash_test_theme') and contains(@href,'/install?')]/@href")[0]; - $this->drupalGet($this->getAbsoluteUrl($url)); + $this->drupalGet($this->getAbsoluteUrl($url->getText())); $this->assertRaw('Unable to install config_clash_test_theme, config_test.dynamic.dotted.default, language/fr/config_test.dynamic.dotted.default already exist in active configuration.'); // Test installing a theme through the API that has existing configuration. diff --git a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php similarity index 98% rename from core/modules/config/src/Tests/ConfigSingleImportExportTest.php rename to core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php index 16cff0aa8a..0619a60245 100644 --- a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php +++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php @@ -1,16 +1,16 @@