diff -u b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
--- b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
+++ b/core/modules/book/tests/src/FunctionalJavascript/BookJavascriptTest.php
@@ -63,7 +63,7 @@
     $this->assertGreaterThan($weight_select1->getValue(), $weight_select2->getValue());
 
     // Check that '1st page' precedes the '2nd page'.
-    $this->assertSession()->responseHasOrder(['1st page', '2nd page']);
+    $this->assertSession()->responseContentHasOrder(['1st page', '2nd page']);
 
     // Check that the 'unsaved changes' text is not present in the message area.
     $this->assertSession()->pageTextNotContains('You have unsaved changes.');
@@ -83,7 +83,7 @@
     $this->assertSession()->pageTextContains('You have unsaved changes.');
 
     // Check that '2nd page' page precedes the '1st page'.
-    $this->assertSession()->responseHasOrder(['2nd page', '1st page']);
+    $this->assertSession()->responseContentHasOrder(['2nd page', '1st page']);
 
     $this->submitForm([], 'Save book pages');
     $this->assertSession()->pageTextContains(new FormattableMarkup('Updated book @book.', ['@book' => $book->getTitle()]));
@@ -94,7 +94,7 @@
     $this->assertGreaterThan($page2->book['weight'], $page1->book['weight']);
 
     // Check again that '2nd page' is on top after form submit in the UI.
-    $this->assertSession()->responseHasOrder(['2nd page', '1st page']);
+    $this->assertSession()->responseContentHasOrder(['2nd page', '1st page']);
 
     // Toggle row weight selects as visible.
     $page->findButton('Show row weights')->click();
@@ -124,7 +124,7 @@
     $this->assertSession()->pageTextContains(new FormattableMarkup('Updated book @book.', ['@book' => $book->getTitle()]));
 
     // Check that the '1st page' is first again.
-    $this->assertSession()->responseHasOrder(['1st page', '2nd page']);
+    $this->assertSession()->responseContentHasOrder(['1st page', '2nd page']);
 
     // Check that page reordering was done in the backend for manual weight
     // field usage.
diff -u b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
--- b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
+++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php
@@ -94,7 +94,7 @@
     $this->assertContextualLinks();
 
     // Confirm repositioning blocks works with content preview disabled.
-    $this->assertSession()->responseHasOrder([$links_field_placeholder_label, $body_field_placeholder_label]);
+    $this->assertSession()->responseContentHasOrder([$links_field_placeholder_label, $body_field_placeholder_label]);
 
     $region_content = '.layout__region--content';
     $links_block = "[data-layout-content-preview-placeholder-label='$links_field_placeholder_label']";
@@ -110,7 +110,7 @@
     $assert_session->pageTextNotContains($content_preview_body_text);
 
     // Check that drag successfully repositioned blocks.
-    $this->assertSession()->responseHasOrder([$body_field_placeholder_label, $links_field_placeholder_label]);
+    $this->assertSession()->responseContentHasOrder([$body_field_placeholder_label, $links_field_placeholder_label]);
 
     // Check if block position maintained after enabling content preview.
     $this->assertTrue($page->hasUncheckedField('layout-builder-content-preview'));
@@ -118,7 +118,7 @@
     $this->assertNotEmpty($assert_session->waitForText($content_preview_body_text));
     $assert_session->pageTextContains($content_preview_body_text);
     $this->assertNotEmpty($assert_session->waitForText('Placeholder for the "Links" field'));
-    $this->assertSession()->responseHasOrder([$content_preview_body_text, 'Placeholder for the "Links" field']);
+    $this->assertSession()->responseContentHasOrder([$content_preview_body_text, 'Placeholder for the "Links" field']);
   }
 
   /**
diff -u b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php
--- b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php
+++ b/core/modules/system/tests/modules/test_page_test/src/Controller/Test.php
@@ -240,7 +240,7 @@
    *   A render array as expected by
    *   \Drupal\Core\Render\RendererInterface::render().
    */
-  public function renderOrderInPage() {
+  public function renderPageWithOrderedContent() {
     return ['#markup' => 'item3<p class="item1 item2 item3">item2</p>item1'];
   }
 
diff -u b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
--- b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
+++ b/core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
@@ -158,5 +158,5 @@
   defaults:
     _title: 'Page with strings in a given order'
-    _controller: '\Drupal\test_page_test\Controller\Test::renderOrderInPage'
+    _controller: '\Drupal\test_page_test\Controller\Test::renderPageWithOrderedContent'
   requirements:
     _access: 'TRUE'
diff -u b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
--- b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
@@ -1001,7 +1001,7 @@
    * Tests assertion of a substring sequence in a string, page content or text.
    *
    * @covers \Drupal\Tests\WebAssert::orderInString
-   * @covers \Drupal\Tests\WebAssert::responseHasOrder
+   * @covers \Drupal\Tests\WebAssert::responseContentHasOrder
    * @covers \Drupal\Tests\WebAssert::pageTextHasOrder
    */
   public function testSubstringsOrder() {
@@ -1020,15 +1020,21 @@
       // Expected exception; just continue testing.
     }
 
+    // Check that passing empty array of substrings works.
+    $this->assertSession()->orderInString([], 'item1item3item2');
+
+    // Check that passing array with one substring works.
+    $this->assertSession()->orderInString(['item1',], 'item1item3item2');
+
     $this->drupalGet('test-order-in-page');
 
     // Check that asserting order in page markup and page text works.
-    $this->assertSession()->responseHasOrder(['item3', 'item1', 'item2']);
+    $this->assertSession()->responseContentHasOrder(['item3', 'item1', 'item2']);
     $this->assertSession()->pageTextHasOrder(['item3', 'item2', 'item1']);
 
     // Check that passing non-existent substrings throws an exception.
     try {
-      $this->assertSession()->responseHasOrder(['item5', 'item1', 'item8']);
+      $this->assertSession()->responseContentHasOrder(['item5', 'item1', 'item8']);
       $this->fail('Expected ElementNotFoundException exception has not been thrown.');
     }
     catch (ElementNotFoundException $exception) {
diff -u b/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php
--- b/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -1134,7 +1134,7 @@
   }
 
   /**
-   * Asserts that several strings are in a given order in the page content.
+   * Asserts that several strings are in a given order in the response content.
    *
    * @param string[] $expected_order
    *   An ordered list of strings.
@@ -1144,30 +1144,23 @@
    * @throws \Behat\Mink\Exception\ExpectationException
    *   When the strings from list are ordered incorrectly in page HTML.
    */
-  public function responseHasOrder(array $expected_order) {
+  public function responseContentHasOrder(array $expected_order) {
     $this->orderInString($expected_order, $this->session->getPage()->getContent());
   }
 
   /**
-   * Asserts that several strings are in a given order in the page text.
+   * Asserts that multiple strings are in a given order in the page text.
    *
    * @param string[] $expected_order
    *   An ordered list of strings.
    *
    * @throws \Behat\Mink\Exception\ElementNotFoundException
    *   When one or more strings from the list are not found in page text.
-   * @throws \Behat\Mink\Exception\ResponseTextException
+   * @throws \Behat\Mink\Exception\ExpectationException
    *   When the strings from list are ordered incorrectly in page text.
    */
   public function pageTextHasOrder(array $expected_order) {
-    try {
-      $this->orderInString($expected_order, $this->session->getPage()->getText());
-    }
-    catch (ExpectationException $exception) {
-      // When checking the order in page text we throw ResponseTextException
-      // rather than ExpectationException.
-      throw new ResponseTextException($exception->getMessage(), $this->session->getDriver(), $exception);
-    }
+    $this->orderInString($expected_order, $this->session->getPage()->getText());
   }
 
 }
