diff --git a/tests/src/Functional/DynamicEntityReferenceBaseTest.php b/tests/src/Functional/DynamicEntityReferenceBaseTest.php index 90441d1..2b58e2b 100644 --- a/tests/src/Functional/DynamicEntityReferenceBaseTest.php +++ b/tests/src/Functional/DynamicEntityReferenceBaseTest.php @@ -85,7 +85,7 @@ class DynamicEntityReferenceBaseTest extends BrowserTestBase { 'selection_handler' => $settings['entity_test']['handler'], 'selection_settings_key' => $selection_settings_key, ))->toString(); - $this->assertTrue(strpos((string) $input['data-autocomplete-path'], $expected_autocomplete_path) !== FALSE); + $this->assertTrue(strpos($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path) !== FALSE); $edit = array( // Ensure that an exact match on a unique label is accepted. @@ -234,7 +234,7 @@ class DynamicEntityReferenceBaseTest extends BrowserTestBase { 'selection_handler' => $settings['entity_test']['handler'], 'selection_settings_key' => $selection_settings_key, ))->toString(); - $this->assertTrue(strpos((string) $input['data-autocomplete-path'], $expected_autocomplete_path) !== FALSE); + $this->assertTrue(strpos($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path) !== FALSE); // Add some extra dynamic entity reference fields. $this->getSession()->getPage()->findButton('field_foobar_add_more')->click(); diff --git a/tests/src/Functional/DynamicEntityReferenceTest.php b/tests/src/Functional/DynamicEntityReferenceTest.php index 724c511..c468459 100644 --- a/tests/src/Functional/DynamicEntityReferenceTest.php +++ b/tests/src/Functional/DynamicEntityReferenceTest.php @@ -245,7 +245,7 @@ class DynamicEntityReferenceTest extends BrowserTestBase { 'selection_handler' => $settings['entity_test_label']['handler'], 'selection_settings_key' => $selection_settings_key, ))->toString(); - $this->assertTrue(strpos((string) $input['data-autocomplete-path'], $expected_autocomplete_path) !== FALSE); + $this->assertTrue(strpos($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path) !== FALSE); // Add some extra dynamic entity reference fields. $this->getSession()->getPage()->findButton('field_foobar_add_more')->click(); @@ -293,7 +293,7 @@ class DynamicEntityReferenceTest extends BrowserTestBase { 'selection_handler' => $settings[$expected_entity_type]['handler'], 'selection_settings_key' => $selection_settings_key, ))->toString(); - $this->assertTrue(strpos((string) $input['data-autocomplete-path'], $expected_autocomplete_path) !== FALSE); + $this->assertTrue(strpos($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path) !== FALSE); } $edit = array(