reverted: --- b/core/modules/system/tests/src/Functional/Form/ValidationTest.php +++ a/core/modules/system/tests/src/Functional/Form/ValidationTest.php @@ -240,11 +240,11 @@ foreach (Element::children($form) as $key) { if (isset($form[$key]['#required_error'])) { $this->assertNoText($form[$key]['#title'] . ' field is required.'); + $this->assertNoText($form[$key]['#required_error']); - $this->assertNoText($form[$key]['#required_error']->render()); } elseif (isset($form[$key]['#form_test_required_error'])) { $this->assertNoText($form[$key]['#title'] . ' field is required.'); + $this->assertNoText($form[$key]['#form_test_required_error']); - $this->assertNoText($form[$key]['#form_test_required_error']->render()); } } $this->assertNoText('An illegal choice has been detected. Please contact the site administrator.'); diff -u b/core/modules/system/tests/src/Functional/Module/UninstallTest.php b/core/modules/system/tests/src/Functional/Module/UninstallTest.php --- b/core/modules/system/tests/src/Functional/Module/UninstallTest.php +++ b/core/modules/system/tests/src/Functional/Module/UninstallTest.php @@ -86,7 +86,7 @@ $edit = []; $edit['uninstall[module_test]'] = TRUE; $this->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall')); - $this->assertNoText(\Drupal::translation()->translate('Configuration deletions')->render(), 'No configuration deletions listed on the module install confirmation page.'); + $this->assertNoText('Configuration deletions', 'No configuration deletions listed on the module install confirmation page.'); $this->assertText(\Drupal::translation()->translate('Configuration updates'), 'Configuration updates listed on the module install confirmation page.'); $this->assertText($node_type->label()); $this->drupalPostForm(NULL, [], t('Uninstall')); @@ -99,7 +99,7 @@ $edit['uninstall[node]'] = TRUE; $this->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall')); $this->assertText(\Drupal::translation()->translate('Configuration deletions'), 'Configuration deletions listed on the module install confirmation page.'); - $this->assertNoText(\Drupal::translation()->translate('Configuration updates')->render(), 'No configuration updates listed on the module install confirmation page.'); + $this->assertNoText('Configuration updates', 'No configuration updates listed on the module install confirmation page.'); $entity_types = []; foreach ($node_dependencies as $entity) { reverted: --- b/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php +++ a/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php @@ -59,7 +59,7 @@ // Create some nodes. $private_node = $this->drupalCreateNode([ + 'title' => t('Private node test'), - 'title' => 'Private node test', 'private' => TRUE, ]); $public_node = $this->drupalCreateNode([ reverted: --- b/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php +++ a/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php @@ -113,9 +113,6 @@ */ protected function assertNoText($text) { @trigger_error('AssertLegacyTrait::assertNoText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED); - if (is_object($text)) { - @trigger_error('Passing MarkupInterface objects to AssertLegacyTrait::assertNoText() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Pass plain strings instead. See https://www.drupal.org/node/xxxxxxx', E_USER_DEPRECATED); - } // Cast MarkupInterface to string. $text = (string) $text;