diff --git a/core/modules/file/tests/src/Functional/FileFieldTestBase.php b/core/modules/file/tests/src/Functional/FileFieldTestBase.php
index f3d1c22b46..dc2e8becc1 100644
--- a/core/modules/file/tests/src/Functional/FileFieldTestBase.php
+++ b/core/modules/file/tests/src/Functional/FileFieldTestBase.php
@@ -7,6 +7,7 @@
 use Drupal\file\FileInterface;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\file\Entity\File;
+use Drupal\Tests\TestFileCreationTrait;
 
 /**
  * Provides methods specifically for testing File module's field handling.
@@ -14,6 +15,9 @@
 abstract class FileFieldTestBase extends BrowserTestBase {
 
   use FileFieldCreationTrait;
+  use TestFileCreationTrait {
+    getTestFiles as drupalGetTestFiles;
+  }
 
   /**
   * Modules to enable.
@@ -156,7 +160,7 @@ public function uploadNodeFiles(array $files, $field_name, $nid_or_type, $new_re
         $edit[$name][] = $file_path;
       }
     }
-    $this->drupalPostForm("node/$nid/edit", $edit, t('Save and keep published'));
+    $this->drupalPostForm("node/$nid/edit", $edit, t('Save'));
 
     return $nid;
   }
@@ -172,7 +176,7 @@ public function removeNodeFile($nid, $new_revision = TRUE) {
     ];
 
     $this->drupalPostForm('node/' . $nid . '/edit', [], t('Remove'));
-    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
+    $this->drupalPostForm(NULL, $edit, t('Save'));
   }
 
   /**
@@ -185,7 +189,7 @@ public function replaceNodeFile($file, $field_name, $nid, $new_revision = TRUE)
     ];
 
     $this->drupalPostForm('node/' . $nid . '/edit', [], t('Remove'));
-    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
+    $this->drupalPostForm(NULL, $edit, t('Save'));
   }
 
   /**
diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
index b9d659a16d..b6484a84e9 100644
--- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
+++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php
@@ -87,10 +87,10 @@ public function uploadNodeImage($image, $field_name, $type, $alt = '') {
       'title[0][value]' => $this->randomMachineName(),
     ];
     $edit['files[' . $field_name . '_0]'] = \Drupal::service('file_system')->realpath($image->uri);
-    $this->drupalPostForm('node/add/' . $type, $edit, t('Save and publish'));
+    $this->drupalPostForm('node/add/' . $type, $edit, t('Save'));
     if ($alt) {
       // Add alt text.
-      $this->drupalPostForm(NULL, [$field_name . '[0][alt]' => $alt], t('Save and publish'));
+      $this->drupalPostForm(NULL, [$field_name . '[0][alt]' => $alt], t('Save'));
     }
 
     // Retrieve ID of the newly created node from the current URL.
diff --git a/core/modules/rdf/src/Tests/GetNamespacesTest.php b/core/modules/rdf/src/Tests/GetNamespacesTest.php
deleted file mode 100644
index ca46c5cd79..0000000000
--- a/core/modules/rdf/src/Tests/GetNamespacesTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-namespace Drupal\rdf\Tests;
-
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Confirm that the serialization of RDF namespaces in present in the HTML
- * markup.
- *
- * @group rdf
- */
-class GetNamespacesTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = ['rdf', 'rdf_test_namespaces'];
-
-  /**
-   * Tests RDF namespaces.
-   */
-  public function testGetRdfNamespaces() {
-    // Fetches the front page and extracts RDFa 1.1 prefixes.
-    $this->drupalGet('');
-
-    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [
-      ':prefix_binding' => 'rdfs: http://www.w3.org/2000/01/rdf-schema#',
-    ]);
-    $this->assertTrue(!empty($element), 'A prefix declared once is displayed.');
-
-    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [
-      ':prefix_binding' => 'foaf: http://xmlns.com/foaf/0.1/',
-    ]);
-    $this->assertTrue(!empty($element), 'The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.');
-
-    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [
-      ':prefix_binding' => 'foaf1: http://xmlns.com/foaf/0.1/',
-    ]);
-    $this->assertTrue(!empty($element), 'Two prefixes can be assigned the same namespace.');
-
-    $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [
-      ':prefix_binding' => 'dc: http://purl.org/dc/terms/',
-    ]);
-    $this->assertTrue(!empty($element), 'When a prefix has conflicting namespaces, the first declared one is used.');
-  }
-
-}
diff --git a/core/modules/rdf/tests/rdf_test/rdf_test.info.yml b/core/modules/rdf/tests/rdf_test/rdf_test.info.yml
new file mode 100644
index 0000000000..9e6a16bcc6
--- /dev/null
+++ b/core/modules/rdf/tests/rdf_test/rdf_test.info.yml
@@ -0,0 +1,8 @@
+name: 'RDF test module'
+type: module
+description: 'Test functionality for the RDF module.'
+package: Testing
+version: VERSION
+core: 8.x
+dependencies:
+  - rdf
diff --git a/core/modules/rdf/src/Tests/Field/TestDataConverter.php b/core/modules/rdf/tests/rdf_test/src/TestDataConverter.php
similarity index 92%
rename from core/modules/rdf/src/Tests/Field/TestDataConverter.php
rename to core/modules/rdf/tests/rdf_test/src/TestDataConverter.php
index fd30b278a2..08bbdd3f68 100644
--- a/core/modules/rdf/src/Tests/Field/TestDataConverter.php
+++ b/core/modules/rdf/tests/rdf_test/src/TestDataConverter.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\rdf\Tests\Field;
+namespace Drupal\rdf_test;
 
 /**
  * Contains methods for test data conversions.
diff --git a/core/modules/rdf/src/Tests/CommentAttributesTest.php b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php
similarity index 99%
rename from core/modules/rdf/src/Tests/CommentAttributesTest.php
rename to core/modules/rdf/tests/src/Functional/CommentAttributesTest.php
index 8ca5798cd5..0c194382ba 100644
--- a/core/modules/rdf/src/Tests/CommentAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php
@@ -1,10 +1,10 @@
 <?php
 
-namespace Drupal\rdf\Tests;
+namespace Drupal\Tests\rdf\Functional;
 
 use Drupal\comment\CommentInterface;
 use Drupal\comment\CommentManagerInterface;
-use Drupal\comment\Tests\CommentTestBase;
+use Drupal\Tests\comment\Functional\CommentTestBase;
 use Drupal\user\RoleInterface;
 use Drupal\comment\Entity\Comment;
 
diff --git a/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
index ad743580dc..bf567c2615 100644
--- a/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\Tests\rdf\Functional;
 
-use Drupal\file\Tests\FileFieldTestBase;
+use Drupal\Tests\file\Functional\FileFieldTestBase;
 use Drupal\file\Entity\File;
 
 /**
diff --git a/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php b/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
index 5d31d3ac23..0b162a4a90 100644
--- a/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
+++ b/core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php
@@ -22,6 +22,25 @@ class GetRdfNamespacesTest extends BrowserTestBase {
    * Tests getting RDF namespaces.
    */
   public function testGetRdfNamespaces() {
+    // Fetches the front page and extracts RDFa 1.1 prefixes.
+    $this->drupalGet('');
+
+    // We have to use the find() method on the driver directly because //html is
+    // prepended to all xpath queries otherwise.
+    $driver = $this->getSession()->getDriver();
+
+    $element = $driver->find('//html[contains(@prefix, "rdfs: http://www.w3.org/2000/01/rdf-schema#")]');
+    $this->assertCount(1, $element, 'A prefix declared once is displayed.');
+
+    $element = $driver->find('//html[contains(@prefix, "foaf: http://xmlns.com/foaf/0.1/")]');
+    $this->assertCount(1, $element, 'The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.');
+
+    $element = $driver->find('//html[contains(@prefix, "foaf1: http://xmlns.com/foaf/0.1/")]');
+    $this->assertCount(1, $element, 'Two prefixes can be assigned the same namespace.');
+
+    $element = $driver->find('//html[contains(@prefix, "dc: http://purl.org/dc/terms/")]');
+    $this->assertCount(1, $element, 'When a prefix has conflicting namespaces, the first declared one is used.');
+
     // Get all RDF namespaces.
     $ns = rdf_get_namespaces();
 
diff --git a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
similarity index 93%
rename from core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
rename to core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
index d4d7d35948..e5707591f7 100644
--- a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
@@ -1,11 +1,12 @@
 <?php
 
-namespace Drupal\rdf\Tests;
+namespace Drupal\Tests\rdf\Functional;
 
 use Drupal\image\Entity\ImageStyle;
-use Drupal\image\Tests\ImageFieldTestBase;
+use Drupal\Tests\image\Functional\ImageFieldTestBase;
 use Drupal\node\Entity\Node;
 use Drupal\file\Entity\File;
+use Drupal\Tests\TestFileCreationTrait;
 
 /**
  * Tests the RDFa markup of imagefields.
@@ -14,6 +15,10 @@
  */
 class ImageFieldAttributesTest extends ImageFieldTestBase {
 
+  use TestFileCreationTrait {
+    getTestFiles as drupalGetTestFiles;
+  }
+
   /**
    * Modules to enable.
    *
diff --git a/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php b/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
index 87067bd68e..2e5675fe6a 100644
--- a/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
+++ b/core/modules/rdf/tests/src/Functional/NodeAttributesTest.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\Tests\rdf\Functional;
 
-use Drupal\node\Tests\NodeTestBase;
+use Drupal\Tests\node\Functional\NodeTestBase;
 
 /**
  * Tests the RDFa markup of Nodes.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
index 94f7f24dac..81d3a40610 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
@@ -19,7 +19,7 @@ class FieldRdfaDatatypeCallbackTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['text', 'filter'];
+  public static $modules = ['text', 'filter', 'rdf_test'];
 
   protected function setUp() {
     parent::setUp();
@@ -33,7 +33,7 @@ protected function setUp() {
     $mapping->setFieldMapping($this->fieldName, [
       'properties' => ['schema:interactionCount'],
       'datatype_callback' => [
-        'callable' => 'Drupal\rdf\Tests\Field\TestDataConverter::convertFoo',
+        'callable' => 'Drupal\rdf_test\TestDataConverter::convertFoo',
       ],
     ])->save();
 
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
index 83bf47a495..a1e01e64e5 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\Tests\shortcut\Functional;
 
-use Drupal\content_translation\Tests\ContentTranslationUITestBase;
+use Drupal\Tests\content_translation\Functional\ContentTranslationUITestBase;
 use Drupal\Core\Entity\EntityChangedInterface;
 use Drupal\Core\Language\Language;
 
