diff --git a/core/modules/datetime/src/Tests/DateTestBase.php b/core/modules/datetime/tests/src/Functional/DateTestBase.php
similarity index 97%
rename from core/modules/datetime/src/Tests/DateTestBase.php
rename to core/modules/datetime/tests/src/Functional/DateTestBase.php
index 81e7550..c329acd 100644
--- a/core/modules/datetime/src/Tests/DateTestBase.php
+++ b/core/modules/datetime/tests/src/Functional/DateTestBase.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\datetime\Tests;
+namespace Drupal\Tests\datetime\Functional;
 
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Entity\Entity\EntityFormDisplay;
@@ -9,12 +9,12 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Provides a base class for testing Datetime field functionality.
  */
-abstract class DateTestBase extends WebTestBase {
+abstract class DateTestBase extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/datetime/src/Tests/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
similarity index 98%
rename from core/modules/datetime/src/Tests/DateTimeFieldTest.php
rename to core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
index 827c811..aa40b5b 100644
--- a/core/modules/datetime/src/Tests/DateTimeFieldTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\datetime\Tests;
+namespace Drupal\Tests\datetime\Functional;
 
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Component\Utility\SafeMarkup;
@@ -67,7 +67,7 @@ public function testDateField() {
         "{$field_name}[0][value][date]" => $date->format($date_format),
       ];
       $this->drupalPostForm(NULL, $edit, t('Save'));
-      preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+      preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
       $id = $match[1];
       $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
       $this->assertRaw($date->format($date_format));
@@ -235,7 +235,7 @@ public function testDatetimeField() {
       "{$field_name}[0][value][time]" => $date->format($time_format),
     ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
     $this->assertRaw($date->format($date_format));
@@ -444,7 +444,7 @@ public function testDatelistWidget() {
     }
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -485,7 +485,7 @@ public function testDatelistWidget() {
     }
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -539,7 +539,7 @@ public function testDatelistWidget() {
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $this->assertResponse(200);
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
diff --git a/core/modules/datetime_range/src/Tests/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
similarity index 98%
rename from core/modules/datetime_range/src/Tests/DateRangeFieldTest.php
rename to core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
index f553315..470a8b1 100644
--- a/core/modules/datetime_range/src/Tests/DateRangeFieldTest.php
+++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php
@@ -1,12 +1,12 @@
 <?php
 
-namespace Drupal\datetime_range\Tests;
+namespace Drupal\Tests\datetime_range\Functional;
 
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\Core\Datetime\Entity\DateFormat;
-use Drupal\datetime\Tests\DateTestBase;
+use Drupal\Tests\datetime\Functional\DateTestBase;
 use Drupal\datetime_range\Plugin\Field\FieldType\DateRangeItem;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
@@ -83,7 +83,7 @@ public function testDateRangeField() {
         "{$field_name}[0][end_value][date]" => $end_date->format($date_format),
       ];
       $this->drupalPostForm(NULL, $edit, t('Save'));
-      preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+      preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
       $id = $match[1];
       $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
       $this->assertRaw($start_date->format($date_format));
@@ -192,7 +192,7 @@ public function testDateRangeField() {
       ];
 
       $this->drupalPostForm(NULL, $edit, t('Save'));
-      preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+      preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
       $id = $match[1];
       $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -289,7 +289,7 @@ public function testDatetimeRangeField() {
       "{$field_name}[0][end_value][time]" => $end_date->format($time_format),
     ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
     $this->assertRaw($start_date->format($date_format));
@@ -368,7 +368,7 @@ public function testDatetimeRangeField() {
     ];
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -453,7 +453,7 @@ public function testAlldayRangeField() {
       "{$field_name}[0][end_value][date]" => $end_date->format($date_format),
     ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
     $this->assertRaw($start_date->format($date_format));
@@ -531,7 +531,7 @@ public function testAlldayRangeField() {
       "{$field_name}[0][end_value][date]" => $start_date->format($date_format),
     ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -712,7 +712,7 @@ public function testDatelistWidget() {
     }
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -767,7 +767,7 @@ public function testDatelistWidget() {
     }
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
@@ -834,7 +834,7 @@ public function testDatelistWidget() {
 
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $this->assertResponse(200);
-    preg_match('|entity_test/manage/(\d+)|', $this->url, $match);
+    preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match);
     $id = $match[1];
     $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));
 
