diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
index 5ffce1f062a5abc2e48c9708c9e9564e043b34ee..5d2fc211ad5bfe82d43a3f001807f00d763c146f 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php
@@ -61,13 +61,10 @@ public function testBlockLinks() {
 
     // Confirm items appear as links.
     $items = $this->container->get('entity_type.manager')->getStorage('aggregator_item')->loadByFeed($feed->id(), 1);
-    $links = $this->xpath('//a[@href = :href]', [':href' => reset($items)->getLink()]);
-    $this->assert(isset($links[0]), 'Item link found.');
+    $this->assertSession()->linkByHrefExists(reset($items)->getLink());
 
     // Find the expected read_more link.
-    $href = $feed->toUrl()->toString();
-    $links = $this->xpath('//a[@href = :href]', [':href' => $href]);
-    $this->assert(isset($links[0]), new FormattableMarkup('Link to href %href found.', ['%href' => $href]));
+    $this->assertSession()->linkByHrefExists($feed->toUrl()->toString());
     $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'aggregator_feed:' . $feed->id());
 
     // Visit that page.
diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
index 5d36dd270fee792969af82f16685744ea5de5ff2..505ed0093e3c694a5082048cae50c3c781928b65 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php
@@ -78,8 +78,7 @@ public function createFeed($feed_url = NULL, array $edit = []) {
     $this->assertText(t('The feed @name has been added.', ['@name' => $edit['title[0][value]']]), new FormattableMarkup('The feed @name has been added.', ['@name' => $edit['title[0][value]']]));
 
     // Verify that the creation message contains a link to a feed.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'aggregator/sources/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a feed');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "aggregator/sources/")]');
 
     $fids = \Drupal::entityQuery('aggregator_feed')->condition('title', $edit['title[0][value]'])->condition('url', $edit['url[0][value]'])->execute();
     $this->assertNotEmpty($fids, 'The feed found in database.');
diff --git a/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
index 4c5a3d3ab3cbaeeb070d732ed28270761648f3ff..6181d8d4147384f705ba5650a3d390747366ca2c 100644
--- a/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
+++ b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php
@@ -47,8 +47,7 @@ public function testUpdateFeedItem() {
     $this->assertText(t('The feed @name has been added.', ['@name' => $edit['title[0][value]']]), new FormattableMarkup('The feed @name has been added.', ['@name' => $edit['title[0][value]']]));
 
     // Verify that the creation message contains a link to a feed.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'aggregator/sources/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a feed');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "aggregator/sources/")]');
 
     $fids = \Drupal::entityQuery('aggregator_feed')->condition('url', $edit['url[0][value]'])->execute();
     $feed = Feed::load(array_values($fids)[0]);
diff --git a/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php b/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
index 86f4bf2750de5b62a03bd410410d25eeee2a435a..0e633009f9e53cabfb49456e1a2d953a701b24c9 100644
--- a/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
+++ b/core/modules/aggregator/tests/src/Functional/UpdateFeedTest.php
@@ -35,8 +35,7 @@ public function testUpdateFeed() {
       $this->assertText(t('The feed @name has been updated.', ['@name' => $edit['title[0][value]']]), new FormattableMarkup('The feed %name has been updated.', ['%name' => $edit['title[0][value]']]));
 
       // Verify that the creation message contains a link to a feed.
-      $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'aggregator/sources/']);
-      $this->assert(isset($view_link), 'The message area contains a link to a feed');
+      $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "aggregator/sources/")]');
 
       // Check feed data.
       $this->assertUrl($feed->toUrl('canonical'));
diff --git a/core/modules/config/tests/src/Functional/ConfigExportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
index 9bb771eb6b76d743d4f4072de7ec919170d65e0f..e822e378cb92a15520c54098e794eea1d4247ace 100644
--- a/core/modules/config/tests/src/Functional/ConfigExportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
@@ -67,7 +67,7 @@ public function testExport() {
     $file_path = $temp_directory . '/config.tar.gz';
     $archiver = new Tar($file_path);
     $archive_contents = $archiver->listContents();
-    $this->assert(!empty($archive_contents), 'Downloaded archive file is not empty.');
+    $this->assertNotEmpty($archive_contents, 'Downloaded archive file is not empty.');
 
     // Prepare the list of config files from active storage, see
     // \Drupal\config\Controller\ConfigController::downloadExport().
diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
index aa52887e57b3f1aa04695c353faa170b3180027a..f40f3332ccfe128af2687d8be1938be878f5e0d9 100644
--- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php
@@ -171,16 +171,14 @@ public function testSiteWideContact() {
     $this->assertText(t('Contact form @label has been added.', ['@label' => $label]));
 
     // Verify that the creation message contains a link to a contact form.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'contact/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a contact form.');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "contact/")]');
 
     // Create first valid form.
     $this->addContactForm($id = mb_strtolower($this->randomMachineName(16)), $label = $this->randomMachineName(16), implode(',', [$recipients[0]]), '', TRUE);
     $this->assertText(t('Contact form @label has been added.', ['@label' => $label]));
 
     // Verify that the creation message contains a link to a contact form.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'contact/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a contact form.');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "contact/")]');
 
     // Check that the form was created in site default language.
     $langcode = $this->config('contact.form.' . $id)->get('langcode');
diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
index 2bc6f1f37b960a8e3c8de2d5b426cbfb5e7a373f..d92d5d6ecd5bfd4771b9ee7fd9e9a2fe779e81cd 100644
--- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
+++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php
@@ -694,7 +694,7 @@ protected function assertNoDependency($type, $key, EntityDisplayInterface $displ
    *   The entity display object to get dependencies from.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertDependencyHelper($assertion, $type, $key, EntityDisplayInterface $display) {
     $all_dependencies = $display->getDependencies();
@@ -703,7 +703,8 @@ protected function assertDependencyHelper($assertion, $type, $key, EntityDisplay
     $value = $assertion ? in_array($key, $dependencies) : !in_array($key, $dependencies);
     $args = ['@context' => $context, '@id' => $display->id(), '@type' => $type, '@key' => $key];
     $message = $assertion ? new FormattableMarkup("@context display '@id' depends on @type '@key'.", $args) : new FormattableMarkup("@context display '@id' do not depend on @type '@key'.", $args);
-    return $this->assert($value, $message);
+    $this->assertTrue($value, $message);
+    return TRUE;
   }
 
 }
diff --git a/core/modules/forum/tests/src/Functional/ForumTest.php b/core/modules/forum/tests/src/Functional/ForumTest.php
index eb718db663a38f8bcf2594b0e823239e2f36aad5..28ceb971809b927fd16921373a6c099c7c8d204e 100644
--- a/core/modules/forum/tests/src/Functional/ForumTest.php
+++ b/core/modules/forum/tests/src/Functional/ForumTest.php
@@ -449,8 +449,7 @@ public function createForum($type, $parent = 0) {
     );
 
     // Verify that the creation message contains a link to a term.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'term/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a term');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "term/")]');
 
     /** @var \Drupal\taxonomy\TermStorageInterface $taxonomy_term_storage */
     $taxonomy_term_storage = $this->container->get('entity_type.manager')->getStorage('taxonomy_term');
@@ -589,9 +588,8 @@ public function createForumTopic($forum, $container = FALSE) {
       $this->assertText(t('@type @title has been created.', ['@type' => $type, '@title' => $title]), 'Forum topic was created');
       $this->assertNoRaw(t('The item %title is a forum container, not a forum.', ['%title' => $forum['name']]), 'No error message was shown');
 
-      // Verify that the creation message contains a link to a term.
-      $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'term/']);
-      $this->assert(isset($view_link), 'The message area contains a link to a term');
+      // Verify that the creation message contains a link to a node.
+      $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "node/")]');
     }
 
     // Retrieve node object, ensure that the topic was created and in the proper forum.
diff --git a/core/modules/locale/tests/src/Functional/LocaleContentTest.php b/core/modules/locale/tests/src/Functional/LocaleContentTest.php
index a97834491fbe152282461a6c126271994c32aee3..9f93136c0dc7b2ac6c68d15d7bf701aaa7107d00 100644
--- a/core/modules/locale/tests/src/Functional/LocaleContentTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleContentTest.php
@@ -140,8 +140,10 @@ public function testContentTypeLanguageConfiguration() {
     $this->assertText(t('@title has been updated.', ['@title' => $node_title]));
 
     // Verify that the creation message contains a link to a node.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'node/' . $node->id()]);
-    $this->assert(isset($view_link), 'The message area contains the link to the edited node');
+    $xpath = $this->assertSession()->buildXPathQuery('//div[@data-drupal-messages]//a[contains(@href, :href)]', [
+      ':href' => 'node/' . $node->id(),
+    ]);
+    $this->assertSession()->elementExists('xpath', $xpath);
 
     $this->drupalLogout();
   }
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
index 8fcef4a60ed158bd3509133cb600ec1aa227dbce..38e290819cd9580b6f5dc2e1bf631f506b8e2269 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
@@ -205,7 +205,7 @@ public function display($message, $type = 'status') {
       $this->migrateMessages[$type][] = $message;
     }
     else {
-      $this->assert($type == 'status', $message, 'migrate');
+      $this->assertEquals('status', $type, $message);
     }
   }
 
diff --git a/core/modules/node/tests/src/Functional/NodeCreationTest.php b/core/modules/node/tests/src/Functional/NodeCreationTest.php
index ba9b49274020399ba57e1ac154213910edf260e8..9c7ba2702ddce5b79be27de2a5d742e6c6552185 100644
--- a/core/modules/node/tests/src/Functional/NodeCreationTest.php
+++ b/core/modules/node/tests/src/Functional/NodeCreationTest.php
@@ -63,8 +63,7 @@ public function testNodeCreation() {
     $this->assertText(t('@post @title has been created.', ['@post' => 'Basic page', '@title' => $edit['title[0][value]']]), 'Basic page created.');
 
     // Verify that the creation message contains a link to a node.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'node/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a node');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "node/")]');
 
     // Check that the node exists in the database.
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
@@ -154,8 +153,7 @@ public function testUnpublishedNodeCreation() {
     $this->assertText(t('@post @title has been created.', ['@post' => 'Basic page', '@title' => $edit['title[0][value]']]));
 
     // Verify that the creation message contains a link to a node.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'node/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a node');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "node/")]');
   }
 
   /**
diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
index fd4203b91548301c003916e737c7eba51663d8c4..9c64abe555db571f6bb26cc311e63d98062132ae 100644
--- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
+++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
@@ -418,13 +418,19 @@ protected function doTestAlternateHreflangLinks(Node $node) {
         $this->drupalGet($urls[$langcode]);
         foreach ($urls as $alternate_langcode => $language_url) {
           // Retrieve desired link elements from the HTML head.
-          $links = $this->xpath('head/link[@rel = "alternate" and @href = :href and @hreflang = :hreflang]',
-             [':href' => $language_url->toString(), ':hreflang' => $alternate_langcode]);
+          $xpath = $this->assertSession()->buildXPathQuery('head/link[@rel = "alternate" and @href = :href and @hreflang = :hreflang]', [
+            ':href' => $language_url->toString(),
+            ':hreflang' => $alternate_langcode,
+          ]);
           if ($translations[$alternate_langcode]->isPublished()) {
-            $this->assert(isset($links[0]), new FormattableMarkup('The %langcode node translation has the correct alternate hreflang link for %alternate_langcode: %link.', ['%langcode' => $langcode, '%alternate_langcode' => $alternate_langcode, '%link' => $url->toString()]));
+            // Verify that the node translation has the correct alternate
+            // hreflang link for the alternate langcode.
+            $this->assertSession()->elementExists('xpath', $xpath);
           }
           else {
-            $this->assertFalse(isset($links[0]), new FormattableMarkup('The %langcode node translation has an hreflang link for unpublished %alternate_langcode translation: %link.', ['%langcode' => $langcode, '%alternate_langcode' => $alternate_langcode, '%link' => $url->toString()]));
+            // Verify that the node translation does not have an alternate
+            // hreflang link for the alternate langcode.
+            $this->assertSession()->elementNotExists('xpath', $xpath);
           }
         }
       }
diff --git a/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php b/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
index 2056f7da091491890e21d2eb795dc328b5d8eaef..79d50cf36fa5ac4b15cb149bfd2fbd223ad557eb 100644
--- a/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
+++ b/core/modules/node/tests/src/Functional/NodeTypeInitialLanguageTest.php
@@ -50,8 +50,7 @@ public function testNodeTypeInitialLanguageDefaults() {
 
     // Tests if the language field cannot be rearranged on the manage fields tab.
     $this->drupalGet('admin/structure/types/manage/article/fields');
-    $language_field = $this->xpath('//*[@id="field-overview"]/*[@id="language"]');
-    $this->assert(empty($language_field), 'Language field is not visible on manage fields tab.');
+    $this->assertSession()->elementNotExists('xpath', '//*[@id="field-overview"]/*[@id="language"]');
 
     // Verify that language is not selectable on node add page by default.
     $this->drupalGet('node/add/article');
@@ -82,13 +81,12 @@ public function testNodeTypeInitialLanguageDefaults() {
     // Tests if the language field can be rearranged on the manage form display
     // tab.
     $this->drupalGet('admin/structure/types/manage/article/form-display');
-    $language_field = $this->xpath('//*[@id="langcode"]');
-    $this->assert(!empty($language_field), 'Language field is visible on manage form display tab.');
+    $this->assertSession()->elementExists('xpath', '//*[@id="langcode"]');
 
     // Tests if the language field can be rearranged on the manage display tab.
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $language_display = $this->xpath('//*[@id="langcode"]');
-    $this->assert(!empty($language_display), 'Language field is visible on manage display tab.');
+    $this->assertSession()->elementExists('xpath', '//*[@id="langcode"]');
+
     // Tests if the language field is hidden by default.
     $this->assertTrue($this->assertSession()->optionExists('edit-fields-langcode-region', 'hidden')->isSelected());
 
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
index 1b1f52a41b2a17e075f8f78920700519b205cf55..8525b7c0aec649d2c9ebb79d0d17bf8904bed5b1 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
@@ -465,12 +465,13 @@ public function testShortcutBlockAccess() {
    *   this default.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertShortcutQuickLink($label, $index = 0, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[normalize-space()=:label]', [':label' => $label]);
     $message = ($message ? $message : new FormattableMarkup('Shortcut quick link with label %label found.', ['%label' => $label]));
-    return $this->assert(isset($links[$index]), $message, $group);
+    $this->assertArrayHasKey($index, $links, $message);
+    return TRUE;
   }
 
 }
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
index 6975d1dd12160c4a16a51c773c268b83d9e1e2ef..4d2372daa1ebf498388992a4db15e26d029b4544 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
@@ -99,8 +99,7 @@ public function testEntityFormLanguage() {
     $this->assertText(t('Basic page @title has been created.', ['@title' => $edit['title[0][value]']]), 'Basic page created.');
 
     // Verify that the creation message contains a link to a node.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'node/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a node');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "node/")]');
 
     // Check to make sure the node was created.
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
diff --git a/core/modules/taxonomy/tests/src/Functional/TermTest.php b/core/modules/taxonomy/tests/src/Functional/TermTest.php
index 27c0fcf647b452adefee258ef040aaf69e40fff9..ced3e92ff73bf8c669c3e6caeb5fa843f6b6bc27 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermTest.php
@@ -277,8 +277,7 @@ public function testNodeTermCreationAndDeletion() {
     $this->assertText(t('@type @title has been created.', ['@type' => t('Article'), '@title' => $edit['title[0][value]']]), 'The node was created successfully.');
 
     // Verify that the creation message contains a link to a node.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'node/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a node');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "node/")]');
 
     foreach ($terms as $term) {
       $this->assertText($term, 'The term was saved and appears on the node page.');
diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
index 3482a0b950784163a3553e73f34ce827e5d750b5..b7c32e3ab2237f3e8a834b5368c420a5f0549f80 100644
--- a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php
@@ -246,8 +246,7 @@ public function testVocabularyPermissionsTaxonomyTerm() {
     $this->assertText(t('Created new term @name.', ['@name' => $edit['name[0][value]']]), 'Term created successfully.');
 
     // Verify that the creation message contains a link to a term.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'term/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a term');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "term/")]');
 
     $terms = \Drupal::entityTypeManager()
       ->getStorage('taxonomy_term')
@@ -321,8 +320,7 @@ public function testVocabularyPermissionsTaxonomyTerm() {
     $this->assertText(t('Updated term @name.', ['@name' => $edit['name[0][value]']]), 'Term updated successfully.');
 
     // Verify that the update message contains a link to a term.
-    $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'term/']);
-    $this->assert(isset($view_link), 'The message area contains a link to a term');
+    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "term/")]');
 
     // Ensure the term cannot be deleted.
     $this->drupalGet('taxonomy/term/' . $term->id() . '/delete');
diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
index b202e10d2b662f7d59d5905879cf6245a62cd435..906a36f7b9ce2fc79092f35feeb8f9c9aec677c4 100644
--- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
@@ -150,7 +150,6 @@ public function testDefaultViews() {
           $view->preExecute($this->viewArgMap[$name]);
         }
 
-        $this->assert(TRUE, new FormattableMarkup('View @view will be executed.', ['@view' => $view->storage->id()]));
         $view->execute();
 
         $tokens = ['@name' => $name, '@display_id' => $display_id];
diff --git a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
index 5911b1548eb7c83419d049421caa8132c2e5e726..79b6ed8c1585d1ed252a231aa60326e53e797299 100644
--- a/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/HandlerTest.php
@@ -234,14 +234,15 @@ public function testHandlerWeights() {
    *   The type of assertion - examples are "Browser", "PHP".
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertEqualValue($expected, $handler, $message = '', $group = 'Other') {
     if (empty($message)) {
       $message = t('Comparing @first and @second', ['@first' => implode(',', $expected), '@second' => implode(',', $handler->value)]);
     }
 
-    return $this->assert($expected == $handler->value, $message, $group);
+    $this->assertEquals($expected, $handler->value, $message);
+    return TRUE;
   }
 
   /**
diff --git a/core/modules/views/tests/src/Functional/SearchIntegrationTest.php b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
index a2a95d9fb46ed07ba14014239fa81122674ace3e..f348e5ac18e6357116924527a2eba849a9326fc2 100644
--- a/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
+++ b/core/modules/views/tests/src/Functional/SearchIntegrationTest.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\Tests\views\Functional;
 
-use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Tests\Traits\Core\CronRunTrait;
 
 /**
@@ -146,12 +145,14 @@ public function testSearchIntegration() {
    *   Link label to assert.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertOneLink($label) {
-    $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => $label]);
-    $message = new FormattableMarkup('Link with label %label found once.', ['%label' => $label]);
-    return $this->assert(isset($links[0]) && !isset($links[1]), $message);
+    $xpath = $this->assertSession()->buildXPathQuery('//a[normalize-space(text())=:label]', [
+      ':label' => $label,
+    ]);
+    $this->assertSession()->elementsCount('xpath', $xpath, 1);
+    return TRUE;
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/AssertContentTrait.php b/core/tests/Drupal/KernelTests/AssertContentTrait.php
index e1fd22e2659f8cd4391af73349d1f9fadf36b015..f459779848805166652db1bf089b1839acfa8f54 100644
--- a/core/tests/Drupal/KernelTests/AssertContentTrait.php
+++ b/core/tests/Drupal/KernelTests/AssertContentTrait.php
@@ -291,14 +291,15 @@ protected function getAllOptions(\SimpleXMLElement $element) {
    *   this default.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertLink($label, $index = 0, $message = '', $group = 'Other') {
     // Cast MarkupInterface objects to string.
     $label = (string) $label;
     $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => $label]);
     $message = ($message ? $message : strtr('Link with label %label found.', ['%label' => $label]));
-    return $this->assert(isset($links[$index]), $message, $group);
+    $this->assertArrayHasKey($index, $links, $message);
+    return TRUE;
   }
 
   /**
@@ -318,14 +319,15 @@ protected function assertLink($label, $index = 0, $message = '', $group = 'Other
    *   this default.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertNoLink($label, $message = '', $group = 'Other') {
     // Cast MarkupInterface objects to string.
     $label = (string) $label;
     $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => $label]);
     $message = ($message ? $message : new FormattableMarkup('Link with label %label not found.', ['%label' => $label]));
-    return $this->assert(empty($links), $message, $group);
+    $this->assertEmpty($links, $message);
+    return TRUE;
   }
 
   /**
@@ -347,12 +349,13 @@ protected function assertNoLink($label, $message = '', $group = 'Other') {
    *   this default.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertLinkByHref($href, $index = 0, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[contains(@href, :href)]', [':href' => $href]);
     $message = ($message ? $message : new FormattableMarkup('Link containing href %href found.', ['%href' => $href]));
-    return $this->assert(isset($links[$index]), $message, $group);
+    $this->assertArrayHasKey($index, $links, $message);
+    return TRUE;
   }
 
   /**
@@ -372,12 +375,13 @@ protected function assertLinkByHref($href, $index = 0, $message = '', $group = '
    *   this default.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertNoLinkByHref($href, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[contains(@href, :href)]', [':href' => $href]);
     $message = ($message ? $message : new FormattableMarkup('No link containing href %href found.', ['%href' => $href]));
-    return $this->assert(empty($links), $message, $group);
+    $this->assertEmpty($links, $message);
+    return TRUE;
   }
 
   /**
@@ -397,12 +401,13 @@ protected function assertNoLinkByHref($href, $message = '', $group = 'Other') {
    *   this default.
    *
    * @return bool
-   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *   TRUE if the assertion succeeded.
    */
   protected function assertNoLinkByHrefInMainRegion($href, $message = '', $group = 'Other') {
     $links = $this->xpath('//main//a[contains(@href, :href)]', [':href' => $href]);
     $message = ($message ? $message : new FormattableMarkup('No link containing href %href found.', ['%href' => $href]));
-    return $this->assert(empty($links), $message, $group);
+    $this->assertEmpty($links, $message);
+    return TRUE;
   }
 
   /**
@@ -686,7 +691,7 @@ protected function assertNoUniqueText($text, $message = '', $group = 'Other') {
    *   should be found more than once. Defaults to FALSE.
    *
    * @return bool
-   *   TRUE on pass, FALSE on fail.
+   *   TRUE on pass.
    */
   protected function assertUniqueTextHelper($text, $message = '', $group = 'Other', $be_unique = FALSE) {
     // Cast MarkupInterface objects to string.
@@ -696,11 +701,12 @@ protected function assertUniqueTextHelper($text, $message = '', $group = 'Other'
     }
     $first_occurrence = strpos($this->getTextContent(), $text);
     if ($first_occurrence === FALSE) {
-      return $this->assert(FALSE, $message, $group);
+      $this->fail($message);
     }
     $offset = $first_occurrence + strlen($text);
     $second_occurrence = strpos($this->getTextContent(), $text, $offset);
-    return $this->assert($be_unique == ($second_occurrence === FALSE), $message, $group);
+    $this->assertEquals($be_unique, $second_occurrence === FALSE, $message);
+    return TRUE;
   }
 
   /**
@@ -720,13 +726,14 @@ protected function assertUniqueTextHelper($text, $message = '', $group = 'Other'
    *   this default.
    *
    * @return bool
-   *   TRUE on pass, FALSE on fail.
+   *   TRUE on pass.
    */
   protected function assertPattern($pattern, $message = '', $group = 'Other') {
     if (!$message) {
       $message = new FormattableMarkup('Pattern "@pattern" found', ['@pattern' => $pattern]);
     }
-    return $this->assert((bool) preg_match($pattern, $this->getRawContent()), $message, $group);
+    $this->assertRegExp($pattern, $this->getRawContent(), $message);
+    return TRUE;
   }
 
   /**
@@ -746,13 +753,14 @@ protected function assertPattern($pattern, $message = '', $group = 'Other') {
    *   this default.
    *
    * @return bool
-   *   TRUE on pass, FALSE on fail.
+   *   TRUE on pass.
    */
   protected function assertNoPattern($pattern, $message = '', $group = 'Other') {
     if (!$message) {
       $message = new FormattableMarkup('Pattern "@pattern" not found', ['@pattern' => $pattern]);
     }
-    return $this->assert(!preg_match($pattern, $this->getRawContent()), $message, $group);
+    $this->assertNotRegExp($pattern, $this->getRawContent(), $message);
+    return TRUE;
   }
 
   /**
@@ -769,13 +777,14 @@ protected function assertNoPattern($pattern, $message = '', $group = 'Other') {
    *   this default.
    *
    * @return bool
-   *   TRUE on pass, FALSE on failure.
+   *   TRUE on pass.
    */
   protected function assertTextPattern($pattern, $message = NULL, $group = 'Other') {
     if (!isset($message)) {
       $message = new FormattableMarkup('Pattern "@pattern" found', ['@pattern' => $pattern]);
     }
-    return $this->assert((bool) preg_match($pattern, $this->getTextContent()), $message, $group);
+    $this->assertRegExp($pattern, $this->getTextContent(), $message);
+    return TRUE;
   }
 
   /**
@@ -1461,7 +1470,7 @@ protected function assertNoField($field, $message = '', $group = 'Other') {
    *   issue that is working to fix that legacy bug.
    *
    * @return bool
-   *   TRUE on pass, FALSE on fail.
+   *   TRUE on pass.
    */
   protected function assertNoDuplicateIds($message = '', $group = 'Other', $ids_to_skip = []) {
     $status = TRUE;
@@ -1473,7 +1482,8 @@ protected function assertNoDuplicateIds($message = '', $group = 'Other', $ids_to
       }
       $seen_ids[$id] = TRUE;
     }
-    return $this->assert($status, $message, $group);
+    $this->assertTrue($status, $message);
+    return TRUE;
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
index 4074a2b64c1c8b752556e339439e88551b112007..48d446febd7373ffb30d8bb05a56879a3d3eca49 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
@@ -311,10 +311,10 @@ public function testGetMultiple() {
     $cids = $reference;
     $ret = $backend->getMultiple($cids);
     // Test return - ensure it contains existing cache ids.
-    $this->assert(isset($ret['test2']), "Existing cache id test2 is set.");
-    $this->assert(isset($ret['test3']), "Existing cache id test3 is set.");
-    $this->assert(isset($ret['test6']), "Existing cache id test6 is set.");
-    $this->assert(isset($ret['test7']), "Existing cache id test7 is set.");
+    $this->assertArrayHasKey('test2', $ret, "Existing cache id test2 is set.");
+    $this->assertArrayHasKey('test3', $ret, "Existing cache id test3 is set.");
+    $this->assertArrayHasKey('test6', $ret, "Existing cache id test6 is set.");
+    $this->assertArrayHasKey('test7', $ret, "Existing cache id test7 is set.");
     // Test return - ensure that objects has expected properties.
     $this->assertTrue($ret['test2']->valid, 'Item is marked as valid.');
     $this->assertTrue($ret['test2']->created >= REQUEST_TIME && $ret['test2']->created <= round(microtime(TRUE), 3), 'Created time is correct.');
@@ -345,9 +345,9 @@ public function testGetMultiple() {
     $cids = $reference;
     $ret = $backend->getMultiple($cids);
     // Test return - ensure it contains existing cache ids.
-    $this->assert(isset($ret['test2']), "Existing cache id test2 is set");
-    $this->assert(isset($ret['test7']), "Existing cache id test7 is set");
-    $this->assert(isset($ret['test19']), "Added cache id test19 is set");
+    $this->assertArrayHasKey('test2', $ret, "Existing cache id test2 is set");
+    $this->assertArrayHasKey('test7', $ret, "Existing cache id test7 is set");
+    $this->assertArrayHasKey('test19', $ret, "Added cache id test19 is set");
     // Test return - ensure it does not contain nonexistent cache ids.
     $this->assertFalse(isset($ret['test3']), "Deleted cache id test3 is not set");
     $this->assertFalse(isset($ret['test6']), "Deleted cache id test6 is not set");
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index 234c256e485935c5d6b8e654e6dba9a81d9f3a08..76014c6e8f148077f4407049e7141a99517b8207 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -418,8 +418,8 @@ public function testBaseFieldCreateDeleteWithExistingEntities() {
     $entity->delete();
     $this->removeBaseField();
     $this->applyEntityUpdates();
-    $assert = !$schema_handler->fieldExists('entity_test_update', 'new_base_field__shape') && !$schema_handler->fieldExists('entity_test_update', 'new_base_field__color');
-    $this->assert($assert, 'Columns removed from the shared table for new_base_field.');
+    $this->assertFalse($schema_handler->fieldExists('entity_test_update', 'new_base_field__shape'), 'Shape column should be removed from the shared table for new_base_field.');
+    $this->assertFalse($schema_handler->fieldExists('entity_test_update', 'new_base_field__color'), 'Color column should be removed from the shared table for new_base_field.');
     $this->addBaseField('shape_required');
     $this->applyEntityUpdates();
     $assert = $schema_handler->fieldExists('entity_test_update', 'new_base_field__shape') && $schema_handler->fieldExists('entity_test_update', 'new_base_field__color');
diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
index 8a00387e70e0cb2a85113ab7a4f4bb38e41ae34e..e1c5711e7e7efce8a66ef968b4b57b9a3d939abb 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@@ -318,6 +318,16 @@ public function testProfileModules() {
     );
   }
 
+  /**
+   * Tests the deprecation of AssertLegacyTrait::assert.
+   *
+   * @group legacy
+   * @expectedDeprecation AssertLegacyTrait::assert() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead. See https://www.drupal.org/node/3129738
+   */
+  public function testAssert() {
+    $this->assert(TRUE);
+  }
+
   /**
    * Tests the deprecation of AssertLegacyTrait::assertIdenticalObject.
    *
diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
index cf83ea429cfc397b2fbb11b89732108eb007344b..1ab62580559ddd95bc038bad4dc4d0a99066697c 100644
--- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -120,7 +120,6 @@ public static function getSkippedDeprecations() {
       "The \"Drupal\Tests\Listeners\DrupalListener\" class uses \"PHPUnit\Framework\TestListenerDefaultImplementation\" that is deprecated The `TestListener` interface is deprecated.",
       "The \"PHPUnit\Framework\TestSuite\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\Tests\TestSuites\TestSuiteBase\".",
       // Simpletest's legacy assertion methods.
-      'AssertLegacyTrait::assert() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead. See https://www.drupal.org/node/3129738',
       'AssertLegacyTrait::assertEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738',
       'AssertLegacyTrait::assertNotEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotEquals() instead. See https://www.drupal.org/node/3129738',
       'AssertLegacyTrait::assertIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertSame() instead. See https://www.drupal.org/node/3129738',