diff --git a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php index 0ba75ac108..2f48a7c6ff 100644 --- a/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php @@ -46,7 +46,7 @@ public function testFormsWithOverrides() { // Test that the original label on the editing page is intact. $this->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/tests/src/Functional/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php index 90392b6329..69ef79762f 100644 --- a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php @@ -168,7 +168,7 @@ public function testListUI() { // Test the contents of each th cell. $expected_items = ['Label', 'Machine name', 'Operations']; foreach ($elements as $key => $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/tests/src/Functional/ConfigFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php index f267561d2a..59276e35f1 100644 --- a/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php +++ b/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php @@ -32,7 +32,7 @@ public function testFormsWithOverrides() { $this->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/tests/src/Functional/ConfigInstallWebTest.php b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php index a28a5b4fd7..b12f17eb19 100644 --- a/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php +++ b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php @@ -156,7 +156,7 @@ public function testPreExistingConfigInstall() { // override created still exists. $this->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.