diff --git a/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php b/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
index a4cbacdf9e..ba69bfee60 100644
--- a/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
+++ b/core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
@@ -101,8 +101,8 @@ public function attachmentsProvider() {
       'random attachment type (unofficial), with random assigned value, to prove BigPipeResponseAttachmentsProcessor is a perfect decorator' => [$random_attachments],
     ];
 
-    $big_pipe_placeholder_attachments = ['big_pipe_placeholders' => $this->randomMachineName()];
-    $big_pipe_nojs_placeholder_attachments = ['big_pipe_nojs_placeholders' => $this->randomMachineName()];
+    $big_pipe_placeholder_attachments = ['big_pipe_placeholders' => [$this->randomMachineName()]];
+    $big_pipe_nojs_placeholder_attachments = ['big_pipe_nojs_placeholders' => [$this->randomMachineName()]];
     $big_pipe_cases = [
       'only big_pipe_placeholders' => [$big_pipe_placeholder_attachments],
       'only big_pipe_nojs_placeholders' => [$big_pipe_nojs_placeholder_attachments],
diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
index dff6270245..9ccbb135d2 100644
--- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
+++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php
@@ -77,7 +77,7 @@ public function testMapperListPage() {
     // Make sure there is only a single operation for each dropbutton, either
     // 'List' or 'Translate'.
     foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-      $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+      $this->assertIdentical(1, count($dropbutton->findAll('xpath', 'li')));
       $this->assertTrue(($dropbutton->getText() === 'Translate') || ($dropbutton->getText() === 'List'));
     }
 
@@ -103,7 +103,7 @@ public function testMapperListPage() {
       // Make sure there is only a single 'Translate' operation for each
       // dropbutton.
       foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-        $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+        $this->assertIdentical(1, count($dropbutton->findAll('xpath', 'li')));
         $this->assertIdentical('Translate', $dropbutton->getText());
       }
 
diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
index 72a2160e22..fb200c7791 100644
--- a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
@@ -332,6 +332,11 @@ public function testFieldAdminHandler() {
     $this->drupalPostForm(NULL, $edit, t('Save field settings'));
     $this->drupalGet($bundle_path . '/fields/' . $field_path);
     $term_name = $this->randomString();
+    $result = \Drupal::entityQuery('taxonomy_term')
+      ->condition('name', $term_name)
+      ->condition('vid', 'tags')
+      ->execute();
+    $this->assertIdentical(0, count($result), "No taxonomy terms exist with the name '$term_name'.");
     $edit = [
       // This must be set before new entities will be auto-created.
       'settings[handler_settings][auto_create]' => 1,
@@ -344,8 +349,11 @@ public function testFieldAdminHandler() {
     ];
     $this->drupalPostForm(NULL, $edit, t('Save settings'));
     // The term should now exist.
-    $term = taxonomy_term_load_multiple_by_name($term_name, 'tags')[1];
-    $this->assertIdentical(1, count($term), 'Taxonomy term was auto created when set as field default.');
+    $result = \Drupal::entityQuery('taxonomy_term')
+      ->condition('name', $term_name)
+      ->condition('vid', 'tags')
+      ->execute();
+    $this->assertIdentical(1, count($result), 'Taxonomy term was auto created when set as field default.');
   }
 
   /**
diff --git a/core/modules/tour/tests/src/Functional/TourTestBase.php b/core/modules/tour/tests/src/Functional/TourTestBase.php
index 522e8e6f36..a8487def61 100644
--- a/core/modules/tour/tests/src/Functional/TourTestBase.php
+++ b/core/modules/tour/tests/src/Functional/TourTestBase.php
@@ -50,14 +50,13 @@ public function assertTourTips($tips = []) {
       // Check for corresponding page elements.
       $total = 0;
       $modals = 0;
-      $raw_content = $this->getSession()->getPage()->getContent();
       foreach ($tips as $tip) {
         if (!empty($tip['data-id'])) {
-          $elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $raw_content, TRUE);
+          $elements = $this->getSession()->getPage()->findAll('css', '#' . $tip['data-id']);
           $this->assertTrue(!empty($elements) && count($elements) === 1, format_string('Found corresponding page element for tour tip with id #%data-id', ['%data-id' => $tip['data-id']]));
         }
         elseif (!empty($tip['data-class'])) {
-          $elements = \PHPUnit_Util_XML::cssSelect('.' . $tip['data-class'], TRUE, $raw_content, TRUE);
+          $elements = $this->getSession()->getPage()->findAll('css', '.' . $tip['data-class']);
           $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', ['%data-class' => $tip['data-class']]));
         }
         else {
