diff --git a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php b/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php
index db665c9e45..3ea2dba06c 100644
--- a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php
+++ b/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\block_content\Tests\Views;
 
+@trigger_error('\Drupal\block_content\Tests\Views\BlockContentTestBase is deprecated in 8.4.0 and will be removed before Drupal 9.0.0. Use \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase.', E_USER_DEPRECATED);
+
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\block_content\Entity\BlockContentType;
 use Drupal\Component\Utility\SafeMarkup;
@@ -10,6 +12,9 @@
 
 /**
  * Base class for all block_content tests.
+ *
+ * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0.
+ *   Use \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase.
  */
 abstract class BlockContentTestBase extends ViewTestBase {
 
diff --git a/core/modules/block_content/src/Tests/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
similarity index 98%
rename from core/modules/block_content/src/Tests/BlockContentCreationTest.php
rename to core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
index ac9e824d49..562a4bd102 100644
--- a/core/modules/block_content/src/Tests/BlockContentCreationTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\Component\Utility\Unicode;
@@ -140,7 +140,7 @@ public function testBlockContentCreationMultipleViewModes() {
 
     // Go to the configure page and verify the view mode has changed.
     $this->drupalGet('admin/structure/block/manage/testblock');
-    $this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]/@value', 'test_view_mode', 'View mode changed to Test View Mode');
+    $this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]', 'test_view_mode', 'View mode changed to Test View Mode');
 
     // Check that the block exists in the database.
     $blocks = entity_load_multiple_by_properties('block_content', ['info' => $edit['info[0][value]']]);
diff --git a/core/modules/block_content/src/Tests/BlockContentListTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
similarity index 95%
rename from core/modules/block_content/src/Tests/BlockContentListTest.php
rename to core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index e00706e9ff..aba60c366c 100644
--- a/core/modules/block_content/src/Tests/BlockContentListTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 /**
  * Tests the listing of custom blocks.
@@ -41,7 +41,7 @@ public function testListing() {
     // Test the contents of each th cell.
     $expected_items = [t('Block description'), t('Operations')];
     foreach ($elements as $key => $element) {
-      $this->assertEqual($element[0], $expected_items[$key]);
+      $this->assertEqual($element->getText(), $expected_items[$key]);
     }
 
     $label = 'Antelope';
@@ -66,7 +66,7 @@ public function testListing() {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical((string) $elements[0], $label);
+    $this->assertIdentical($elements[0]->getText(), $label);
 
     // Edit the entity using the operations link.
     $blocks = $this->container
diff --git a/core/modules/block_content/src/Tests/BlockContentListViewsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
similarity index 91%
rename from core/modules/block_content/src/Tests/BlockContentListViewsTest.php
rename to core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
index 77117fb009..1c623be82e 100644
--- a/core/modules/block_content/src/Tests/BlockContentListViewsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 /**
  * Tests the Views-powered listing of custom blocks.
@@ -41,13 +41,13 @@ public function testListing() {
     $this->assertEqual(count($elements), 4, 'Correct number of table header cells found.');
 
     // Test the contents of each th cell.
-    $expected_items = ['Block description', 'Block type', 'Updated', 'Operations'];
+    $expected_items = ['Block description', 'Block type', 'Updated Sort ascending', 'Operations'];
     foreach ($elements as $key => $element) {
-      if ($element->xpath('a')) {
-        $this->assertIdentical(trim((string) $element->xpath('a')[0]), $expected_items[$key]);
+      if ($element->find('xpath', 'a')) {
+        $this->assertIdentical(trim($element->find('xpath', 'a')->getText()), $expected_items[$key]);
       }
       else {
-        $this->assertIdentical(trim((string) $element[0]), $expected_items[$key]);
+        $this->assertIdentical(trim($element->getText()), $expected_items[$key]);
       }
     }
 
@@ -73,7 +73,7 @@ public function testListing() {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical((string) $elements[0]->xpath('a')[0], $label);
+    $this->assertIdentical($elements[0]->find('xpath', 'a')->getText(), $label);
 
     // Edit the entity using the operations link.
     $blocks = $this->container
diff --git a/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
similarity index 99%
rename from core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
rename to core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
index 198beee8fb..2699fcfb69 100644
--- a/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\block_content\Entity\BlockContentType;
diff --git a/core/modules/block_content/src/Tests/BlockContentValidationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentValidationTest.php
similarity index 96%
rename from core/modules/block_content/src/Tests/BlockContentValidationTest.php
rename to core/modules/block_content/tests/src/Functional/BlockContentValidationTest.php
index a0db394c6e..bfa84082c1 100644
--- a/core/modules/block_content/src/Tests/BlockContentValidationTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentValidationTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests;
+namespace Drupal\Tests\block_content\Functional;
 
 /**
  * Tests block content validation constraints.
diff --git a/core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
similarity index 95%
rename from core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php
rename to core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
index 1ff4fb55ba..a016ab9141 100644
--- a/core/modules/block_content/src/Tests/Views/BlockContentFieldFilterTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\language\Entity\ConfigurableLanguage;
@@ -35,8 +35,8 @@ class BlockContentFieldFilterTest extends BlockContentTestBase {
   /**
    * {@inheritdoc}
    */
-  public function setUp() {
-    parent::setUp();
+  public function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     // Add two new languages.
     ConfigurableLanguage::createFromLangcode('fr')->save();
diff --git a/core/modules/block_content/src/Tests/Views/BlockContentIntegrationTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
similarity index 95%
rename from core/modules/block_content/src/Tests/Views/BlockContentIntegrationTest.php
rename to core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
index 8ec17e2381..93661578bd 100644
--- a/core/modules/block_content/src/Tests/Views/BlockContentIntegrationTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentIntegrationTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 /**
  * Tests the block_content integration into views.
@@ -59,7 +59,7 @@ protected function assertIds(array $expected_ids = []) {
     $result = $this->xpath('//span[@class="field-content"]');
     $ids = [];
     foreach ($result as $element) {
-      $ids[] = (int) $element;
+      $ids[] = $element->getText();
     }
     $this->assertEqual($ids, $expected_ids);
   }
diff --git a/core/modules/block_content/src/Tests/Views/BlockContentRedirectTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
similarity index 95%
rename from core/modules/block_content/src/Tests/Views/BlockContentRedirectTest.php
rename to core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
index 828aa8468b..10ce140e96 100644
--- a/core/modules/block_content/src/Tests/Views/BlockContentRedirectTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 /**
  * Tests the redirect destination on block content on entity operations.
diff --git a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
similarity index 96%
copy from core/modules/block_content/src/Tests/Views/BlockContentTestBase.php
copy to core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
index db665c9e45..ffce588605 100644
--- a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php
+++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php
@@ -1,11 +1,11 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\block_content\Entity\BlockContent;
 use Drupal\block_content\Entity\BlockContentType;
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Tests\ViewTestData;
 
 /**
diff --git a/core/modules/block_content/src/Tests/Views/FieldTypeTest.php b/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
similarity index 93%
rename from core/modules/block_content/src/Tests/Views/FieldTypeTest.php
rename to core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
index e9aa336985..8ff2fc05ca 100644
--- a/core/modules/block_content/src/Tests/Views/FieldTypeTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/FieldTypeTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\views\Views;
 
diff --git a/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php b/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
similarity index 92%
rename from core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php
rename to core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
index 7bad093dd3..0ccebd2a9f 100644
--- a/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php
+++ b/core/modules/block_content/tests/src/Functional/Views/RevisionRelationshipsTest.php
@@ -1,10 +1,10 @@
 <?php
 
-namespace Drupal\block_content\Tests\Views;
+namespace Drupal\Tests\block_content\Functional\Views;
 
 use Drupal\block_content\Entity\BlockContentType;
 use Drupal\block_content\Entity\BlockContent;
-use Drupal\views\Tests\ViewTestBase;
+use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Views;
 use Drupal\views\Tests\ViewTestData;
 
@@ -29,8 +29,8 @@ class RevisionRelationshipsTest extends ViewTestBase {
    */
   public static $testViews = ['test_block_content_revision_id', 'test_block_content_revision_revision_id'];
 
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
     BlockContentType::create([
       'id' => 'basic',
       'label' => 'basic',
