diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
index 244d0eeb46..31c51a0be3 100644
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
@@ -271,9 +271,9 @@ protected function prepareRequestForGenerator($clean_urls = TRUE, $override_serv
     $server = array_merge($server, $override_server_vars);
 
     $request = Request::create($request_path, 'GET', [], [], [], $server);
-    // Ensure the request time is REQUEST_TIME to ensure that API calls
+    // Ensure the request time is $this->requestTime to ensure that API calls
     // in the test use the right timestamp.
-    $request->server->set('REQUEST_TIME', REQUEST_TIME);
+    $request->server->set('$this->requestTime', $this->requestTime);
     $this->container->get('request_stack')->push($request);
 
     // The request context is normally set by the router_listener from within
diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php b/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
index 775293af8e..eacb21ff49 100644
--- a/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
+++ b/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php
@@ -39,7 +39,7 @@ public function testCron() {
 
     // Test feed locking when queued for update.
     $this->deleteFeedItems($feed);
-    $feed->setQueuedTime(REQUEST_TIME)->save();
+    $feed->setQueuedTime($this->requestTime)->save();
     $this->cronRun();
     $this->assertEquals(0, $count_query->execute());
     $feed->setQueuedTime(0)->save();
diff --git a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
index 0a03272f27..874136506f 100644
--- a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
+++ b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php
@@ -89,7 +89,7 @@ public function testAggregatorItemView() {
     for ($i = 0; $i < 10; $i++) {
       $values = [];
       $values['fid'] = $feed->id();
-      $values['timestamp'] = mt_rand(REQUEST_TIME - 10, REQUEST_TIME + 10);
+      $values['timestamp'] = mt_rand($this->requestTime - 10, $this->requestTime + 10);
       $values['title'] = $this->randomMachineName();
       $values['description'] = $this->randomMachineName();
       // Add an image to ensure that the sanitizing can be tested below.
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
index 59c556ca5b..6a6be2a40d 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void {
       $block->setNewRevision(TRUE);
       $block->setRevisionLogMessage($this->randomMachineName(32));
       $block->setRevisionUser($this->adminUser);
-      $block->setRevisionCreationTime(REQUEST_TIME);
+      $block->setRevisionCreationTime($this->requestTime);
       $logs[] = $block->getRevisionLogMessage();
       $block->save();
       $blocks[] = $block->getRevisionId();
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
index 75e9a554cf..ec8d8f10eb 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php
@@ -70,7 +70,7 @@ public function testImport() {
   public function testDeterminingChanges() {
     // Initial creation.
     $block = $this->createBlockContent('test_changes');
-    $this->assertEquals(REQUEST_TIME, $block->getChangedTime(), 'Creating a block sets default "changed" timestamp.');
+    $this->assertEquals($this->requestTime, $block->getChangedTime(), 'Creating a block sets default "changed" timestamp.');
 
     // Update the block without applying changes.
     $block->save();
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
index e0b688a27f..0eac6574b9 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
@@ -40,7 +40,7 @@ public function testBlockMigration() {
     /** @var \Drupal\block_content\Entity\BlockContent $block */
     $block = BlockContent::load(1);
     $this->assertSame('My block 1', $block->label());
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $block->getChangedTime());
+    $this->assertGreaterThanOrEqual($this->requestTime, $block->getChangedTime());
     $this->assertLessThanOrEqual(time(), $block->getChangedTime());
     $this->assertSame('en', $block->language()->getId());
     $this->assertSame('<h3>My first custom block body</h3>', $block->body->value);
@@ -48,7 +48,7 @@ public function testBlockMigration() {
 
     $block = BlockContent::load(2);
     $this->assertSame('My block 2', $block->label());
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $block->getChangedTime());
+    $this->assertGreaterThanOrEqual($this->requestTime, $block->getChangedTime());
     $this->assertLessThanOrEqual(time(), $block->getChangedTime());
     $this->assertSame('en', $block->language()->getId());
     $this->assertSame('<h3>My second custom block body</h3>', $block->body->value);
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
index dc8ace7577..0246783fb1 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
@@ -45,7 +45,7 @@ public function testCustomBlockContentTranslation() {
     /** @var \Drupal\block_content\Entity\BlockContent $block */
     $block = BlockContent::load(1)->getTranslation('fr');
     $this->assertSame('fr - Static Block', $block->label());
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $block->getChangedTime());
+    $this->assertGreaterThanOrEqual($this->requestTime, $block->getChangedTime());
     $this->assertLessThanOrEqual(time(), $block->getChangedTime());
     $this->assertSame('fr', $block->language()->getId());
     $this->assertSame('<h3>fr - My first custom block body</h3>', $block->body->value);
@@ -53,7 +53,7 @@ public function testCustomBlockContentTranslation() {
 
     $block = $block->getTranslation('zu');
     $this->assertSame('My block 1', $block->label());
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $block->getChangedTime());
+    $this->assertGreaterThanOrEqual($this->requestTime, $block->getChangedTime());
     $this->assertLessThanOrEqual(time(), $block->getChangedTime());
     $this->assertSame('zu', $block->language()->getId());
     $this->assertSame('<h3>zu - My first custom block body</h3>', $block->body->value);
@@ -61,7 +61,7 @@ public function testCustomBlockContentTranslation() {
 
     $block = BlockContent::load(2)->getTranslation('fr');
     $this->assertSame('Encore un bloc statique', $block->label());
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $block->getChangedTime());
+    $this->assertGreaterThanOrEqual($this->requestTime, $block->getChangedTime());
     $this->assertLessThanOrEqual(time(), $block->getChangedTime());
     $this->assertSame('fr', $block->language()->getId());
     $this->assertSame('Nom de vocabulaire beaucoup plus long que trente-deux caractères', $block->body->value);
diff --git a/core/modules/comment/tests/src/Functional/CommentBlockTest.php b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
index ac72aeae0f..a63ea43b3c 100644
--- a/core/modules/comment/tests/src/Functional/CommentBlockTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentBlockTest.php
@@ -47,7 +47,7 @@ public function testRecentCommentBlock() {
     // Add some test comments, with and without subjects. Because the 10 newest
     // comments should be shown by the block, we create 11 to test that behavior
     // below.
-    $timestamp = REQUEST_TIME;
+    $timestamp = $this->requestTime;
     for ($i = 0; $i < 11; ++$i) {
       $subject = ($i % 2) ? $this->randomMachineName() : '';
       $comments[$i] = $this->postComment($this->node, $this->randomMachineName(), $subject);
diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
index 5aae524c71..ad5f4f8b14 100644
--- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
+++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
@@ -174,7 +174,7 @@ protected function doTestAuthoringInfo() {
       $user = $this->drupalCreateUser();
       $values[$langcode] = [
         'uid' => $user->id(),
-        'created' => REQUEST_TIME - mt_rand(0, 1000),
+        'created' => $this->requestTime - mt_rand(0, 1000),
       ];
       /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */
       $date_formatter = $this->container->get('date.formatter');
diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
index 0636c43385..65965edfb2 100644
--- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php
@@ -97,7 +97,7 @@ protected function setUp($import_test_views = TRUE): void {
       $comment->comment_body->format = 'full_html';
 
       // Ensure comments are sorted in ascending order.
-      $time = REQUEST_TIME + ($this->defaultDisplayResults - $i);
+      $time = $this->requestTime + ($this->defaultDisplayResults - $i);
       $comment->setCreatedTime($time);
       $comment->changed->value = $time;
 
diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
index f4fc987dcf..a4d1dba5f6 100644
--- a/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
+++ b/core/modules/comment/tests/src/Kernel/Views/CommentViewsFieldAccessTest.php
@@ -78,7 +78,7 @@ public function testCommentFields() {
     $this->assertFieldAccess('comment', 'homepage', 'https://example.com');
     $this->assertFieldAccess('comment', 'uid', $user->getAccountName());
     // $this->assertFieldAccess('comment', 'created', \Drupal::service('date.formatter')->format(123456));
-    // $this->assertFieldAccess('comment', 'changed', \Drupal::service('date.formatter')->format(REQUEST_TIME));
+    // $this->assertFieldAccess('comment', 'changed', \Drupal::service('date.formatter')->format($this->requestTime));
     $this->assertFieldAccess('comment', 'status', 'On');
   }
 
diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php
index 6a103e4757..d1b781b953 100644
--- a/core/modules/content_translation/src/ContentTranslationHandler.php
+++ b/core/modules/content_translation/src/ContentTranslationHandler.php
@@ -523,14 +523,14 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
         '#description' => t('Leave blank for %anonymous.', ['%anonymous' => \Drupal::config('user.settings')->get('anonymous')]),
       ];
 
-      $date = $new_translation ? REQUEST_TIME : $metadata->getCreatedTime();
+      $date = $new_translation ? $this->requestTime : $metadata->getCreatedTime();
       $form['content_translation']['created'] = [
         '#type' => 'textfield',
         '#title' => t('Authored on'),
         '#maxlength' => 25,
         '#description' => t('Format: %time. The date format is YYYY-MM-DD and %timezone is the time zone offset from UTC. Leave blank to use the time of form submission.', [
-          '%time' => $this->dateFormatter->format(REQUEST_TIME, 'custom', 'Y-m-d H:i:s O'),
-          '%timezone' => $this->dateFormatter->format(REQUEST_TIME, 'custom', 'O'),
+          '%time' => $this->dateFormatter->format($this->requestTime, 'custom', 'Y-m-d H:i:s O'),
+          '%timezone' => $this->dateFormatter->format($this->requestTime, 'custom', 'O'),
         ]),
         '#default_value' => $new_translation || !$date ? '' : $this->dateFormatter->format($date, 'custom', 'Y-m-d H:i:s O'),
       ];
@@ -684,7 +684,7 @@ public function entityFormEntityBuild($entity_type, EntityInterface $entity, arr
     $metadata = $this->manager->getTranslationMetadata($entity);
     $metadata->setAuthor(!empty($values['uid']) ? User::load($values['uid']) : User::load(0));
     $metadata->setPublished(!empty($values['status']));
-    $metadata->setCreatedTime(!empty($values['created']) ? strtotime($values['created']) : REQUEST_TIME);
+    $metadata->setCreatedTime(!empty($values['created']) ? strtotime($values['created']) : $this->requestTime);
 
     $metadata->setOutdated(!empty($values['outdated']));
     if (!empty($values['retranslate'])) {
@@ -731,7 +731,7 @@ public function entityFormSubmit($form, FormStateInterface $form_state) {
     // handler as well and have the same logic like in the Form API.
     if ($entity->hasField('content_translation_changed')) {
       $metadata = $this->manager->getTranslationMetadata($entity);
-      $metadata->setChangedTime(REQUEST_TIME);
+      $metadata->setChangedTime($this->requestTime);
     }
   }
 
diff --git a/core/modules/content_translation/src/Controller/ContentTranslationController.php b/core/modules/content_translation/src/Controller/ContentTranslationController.php
index b0bb48d096..eb1c45663f 100644
--- a/core/modules/content_translation/src/Controller/ContentTranslationController.php
+++ b/core/modules/content_translation/src/Controller/ContentTranslationController.php
@@ -84,7 +84,7 @@ public function prepareTranslation(ContentEntityInterface $entity, LanguageInter
     // Update the translation author to current user, as well the translation
     // creation time.
     $metadata->setAuthor($user);
-    $metadata->setCreatedTime(REQUEST_TIME);
+    $metadata->setCreatedTime($this->requestTime);
     $metadata->setSource($source_langcode);
   }
 
diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
index e853e595df..bb78853415 100644
--- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
+++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php
@@ -329,7 +329,7 @@ protected function doTestAuthoringInfo() {
       $user = $this->drupalCreateUser();
       $values[$langcode] = [
         'uid' => $user->id(),
-        'created' => REQUEST_TIME - mt_rand(0, 1000),
+        'created' => $this->requestTime - mt_rand(0, 1000),
       ];
       $edit = [
         'content_translation[uid]' => $user->getAccountName(),
diff --git a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
index 7355414411..51df596c99 100644
--- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
+++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php
@@ -185,7 +185,7 @@ public function testDateField() {
       // has the same interval.  Since the database always stores UTC, and the
       // interval will use this, force the test date to use UTC and not the local
       // or user timezone.
-      $timestamp = REQUEST_TIME - 87654321;
+      $timestamp = $this->requestTime - 87654321;
       $entity = EntityTest::load($id);
       $field_name = $this->fieldStorage->getName();
       $date = DrupalDateTime::createFromTimestamp($timestamp, 'UTC');
@@ -215,7 +215,7 @@ public function testDateField() {
       // has the same interval.  Since the database always stores UTC, and the
       // interval will use this, force the test date to use UTC and not the local
       // or user timezone.
-      $timestamp = REQUEST_TIME + 87654321;
+      $timestamp = $this->requestTime + 87654321;
       $entity = EntityTest::load($id);
       $field_name = $this->fieldStorage->getName();
       $date = DrupalDateTime::createFromTimestamp($timestamp, 'UTC');
@@ -342,7 +342,7 @@ public function testDatetimeField() {
     // has the same interval.  Since the database always stores UTC, and the
     // interval will use this, force the test date to use UTC and not the local
     // or user timezone.
-    $timestamp = REQUEST_TIME - 87654321;
+    $timestamp = $this->requestTime - 87654321;
     $entity = EntityTest::load($id);
     $field_name = $this->fieldStorage->getName();
     $date = DrupalDateTime::createFromTimestamp($timestamp, 'UTC');
@@ -369,7 +369,7 @@ public function testDatetimeField() {
     // has the same interval.  Since the database always stores UTC, and the
     // interval will use this, force the test date to use UTC and not the local
     // or user timezone.
-    $timestamp = REQUEST_TIME + 87654321;
+    $timestamp = $this->requestTime + 87654321;
     $entity = EntityTest::load($id);
     $field_name = $this->fieldStorage->getName();
     $date = DrupalDateTime::createFromTimestamp($timestamp, 'UTC');
diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
index cdafe7d150..7e611f5f5e 100644
--- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
+++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php
@@ -38,7 +38,7 @@ class FilterDateTimeTest extends DateTimeHandlerTestBase {
   protected function setUp($import_test_views = TRUE): void {
     parent::setUp($import_test_views);
 
-    static::$date = REQUEST_TIME + 86400;
+    static::$date = $this->requestTime + 86400;
 
     // Set the timezone.
     date_default_timezone_set(static::$timezone);
diff --git a/core/modules/dblog/tests/src/Functional/DbLogTest.php b/core/modules/dblog/tests/src/Functional/DbLogTest.php
index f83931cf4d..dcaeb370b8 100644
--- a/core/modules/dblog/tests/src/Functional/DbLogTest.php
+++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php
@@ -119,7 +119,7 @@ public function testLogEventPage() {
       'channel' => 'testing',
       'link' => 'foo/bar',
       'ip' => '0.0.1.0',
-      'timestamp' => REQUEST_TIME,
+      'timestamp' => $this->requestTime,
     ];
     \Drupal::service('logger.dblog')->log(RfcLogLevel::NOTICE, 'Test message', $context);
     $query = Database::getConnection()->select('watchdog');
@@ -636,7 +636,7 @@ public function testDBLogAddAndClear() {
       'request_uri' => $base_root . \Drupal::request()->getRequestUri(),
       'referer'     => \Drupal::request()->server->get('HTTP_REFERER'),
       'ip'          => '127.0.0.1',
-      'timestamp'   => REQUEST_TIME,
+      'timestamp'   => $this->requestTime,
     ];
     // Add a watchdog entry.
     $this->container->get('logger.dblog')->log($log['severity'], $log['message'], $log);
diff --git a/core/modules/dblog/tests/src/Functional/FakeLogEntries.php b/core/modules/dblog/tests/src/Functional/FakeLogEntries.php
index 588510eebc..bfeb3be11b 100644
--- a/core/modules/dblog/tests/src/Functional/FakeLogEntries.php
+++ b/core/modules/dblog/tests/src/Functional/FakeLogEntries.php
@@ -50,7 +50,7 @@ private function generateLogEntries($count, $options = []) {
       'request_uri' => $base_root . \Drupal::request()->getRequestUri(),
       'referer'     => \Drupal::request()->server->get('HTTP_REFERER'),
       'ip'          => '127.0.0.1',
-      'timestamp'   => REQUEST_TIME,
+      'timestamp'   => $this->requestTime,
     ];
 
     $logger = $this->container->get('logger.dblog');
diff --git a/core/modules/field/tests/src/Functional/NestedFormTest.php b/core/modules/field/tests/src/Functional/NestedFormTest.php
index 7621b07e3a..0761f2c6b9 100644
--- a/core/modules/field/tests/src/Functional/NestedFormTest.php
+++ b/core/modules/field/tests/src/Functional/NestedFormTest.php
@@ -199,11 +199,11 @@ public function testNestedEntityFormEntityLevelValidation() {
 
     // Display the 'combined form'.
     $this->drupalGet("test-entity-constraints/nested/{$entity_1->id()}/{$entity_2->id()}");
-    $assert_session->hiddenFieldValueEquals('entity_2[changed]', REQUEST_TIME);
+    $assert_session->hiddenFieldValueEquals('entity_2[changed]', $this->requestTime);
 
     // Submit the form and check that the entities are updated accordingly.
     $assert_session->hiddenFieldExists('entity_2[changed]')
-      ->setValue(REQUEST_TIME - 86400);
+      ->setValue($this->requestTime - 86400);
     $page->pressButton('Save');
 
     $elements = $this->cssSelect('.entity-2.error');
diff --git a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
index 2e5e7349aa..f3215c1961 100644
--- a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
+++ b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php
@@ -124,7 +124,7 @@ public function testTimestampFormatter() {
         $timezone = NULL;
       }
 
-      $value = REQUEST_TIME - 87654321;
+      $value = $this->requestTime - 87654321;
       $expected = \Drupal::service('date.formatter')->format($value, $date_format, $custom_date_format, $timezone);
 
       $component = $this->display->getComponent($this->fieldName);
@@ -158,10 +158,10 @@ public function testTimestampAgoFormatter() {
       $future_format = $settings['future_format'];
       $past_format = $settings['past_format'];
       $granularity = $settings['granularity'];
-      $request_time = \Drupal::requestStack()->getCurrentRequest()->server->get('REQUEST_TIME');
+      $$this->requestTime = \Drupal::requestStack()->getCurrentRequest()->server->get('$this->requestTime');
 
       // Test a timestamp in the past
-      $value = $request_time - 87654321;
+      $value = $$this->requestTime - 87654321;
       $expected = new FormattableMarkup($past_format, ['@interval' => \Drupal::service('date.formatter')->formatTimeDiffSince($value, ['granularity' => $granularity])]);
 
       $component = $this->display->getComponent($this->fieldName);
@@ -176,7 +176,7 @@ public function testTimestampAgoFormatter() {
       $this->assertRaw($expected);
 
       // Test a timestamp in the future
-      $value = $request_time + 87654321;
+      $value = $$this->requestTime + 87654321;
       $expected = new FormattableMarkup($future_format, ['@interval' => \Drupal::service('date.formatter')->formatTimeDiffUntil($value, ['granularity' => $granularity])]);
 
       $component = $this->display->getComponent($this->fieldName);
diff --git a/core/modules/file/tests/src/Functional/FileFieldPathTest.php b/core/modules/file/tests/src/Functional/FileFieldPathTest.php
index 4a139ab7da..7f3f16c373 100644
--- a/core/modules/file/tests/src/Functional/FileFieldPathTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldPathTest.php
@@ -40,8 +40,8 @@ public function testUploadPath() {
     $date_formatter = $this->container->get('date.formatter');
     $expected_filename =
       'public://' .
-      $date_formatter->format(REQUEST_TIME, 'custom', 'Y') . '-' .
-      $date_formatter->format(REQUEST_TIME, 'custom', 'm') . '/' .
+      $date_formatter->format($this->requestTime, 'custom', 'Y') . '-' .
+      $date_formatter->format($this->requestTime, 'custom', 'm') . '/' .
       $test_file->getFilename();
     $this->assertPathMatch($expected_filename, $node_file->getFileUri(), new FormattableMarkup('The file %file was uploaded to the correct path.', ['%file' => $node_file->getFileUri()]));
 
diff --git a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php
index 8ebdd16293..57634daa95 100644
--- a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php
@@ -132,7 +132,7 @@ public function testRevisions() {
     $connection = Database::getConnection();
     $connection->update('file_managed')
       ->fields([
-        'changed' => REQUEST_TIME - ($this->config('system.file')->get('temporary_maximum_age') + 1),
+        'changed' => $this->requestTime - ($this->config('system.file')->get('temporary_maximum_age') + 1),
       ])
       ->condition('fid', $node_file_r3->id())
       ->execute();
@@ -150,7 +150,7 @@ public function testRevisions() {
     // would set the timestamp.
     $connection->update('file_managed')
       ->fields([
-        'changed' => REQUEST_TIME - ($this->config('system.file')->get('temporary_maximum_age') + 1),
+        'changed' => $this->requestTime - ($this->config('system.file')->get('temporary_maximum_age') + 1),
       ])
       ->condition('fid', $node_file_r1->id())
       ->execute();
diff --git a/core/modules/file/tests/src/Kernel/DeleteTest.php b/core/modules/file/tests/src/Kernel/DeleteTest.php
index e3ca3f5e3c..7bfa191ce9 100644
--- a/core/modules/file/tests/src/Kernel/DeleteTest.php
+++ b/core/modules/file/tests/src/Kernel/DeleteTest.php
@@ -65,7 +65,7 @@ public function testInUse() {
     // would set the timestamp.
     Database::getConnection()->update('file_managed')
       ->fields([
-        'changed' => REQUEST_TIME - ($this->config('system.file')->get('temporary_maximum_age') + 1),
+        'changed' => $this->requestTime - ($this->config('system.file')->get('temporary_maximum_age') + 1),
       ])
       ->condition('fid', $file->id())
       ->execute();
@@ -92,7 +92,7 @@ public function testCronDeleteNonExistingTemporary() {
     // configuration value.
     \Drupal::database()->update('file_managed')
       ->fields([
-        'changed' => REQUEST_TIME - ($this->config('system.file')->get('temporary_maximum_age') + 1),
+        'changed' => $this->requestTime - ($this->config('system.file')->get('temporary_maximum_age') + 1),
       ])
       ->condition('fid', $file->id())
       ->execute();
diff --git a/core/modules/file/tests/src/Kernel/UsageTest.php b/core/modules/file/tests/src/Kernel/UsageTest.php
index 1e1a43cec2..109d81166d 100644
--- a/core/modules/file/tests/src/Kernel/UsageTest.php
+++ b/core/modules/file/tests/src/Kernel/UsageTest.php
@@ -163,7 +163,7 @@ public function createTempFiles() {
     $connection->update('file_managed')
       ->fields([
         'status' => 0,
-        'changed' => REQUEST_TIME - $this->config('system.file')->get('temporary_maximum_age') - 1,
+        'changed' => $this->requestTime - $this->config('system.file')->get('temporary_maximum_age') - 1,
       ])
       ->condition('fid', $temp_old->id())
       ->execute();
@@ -180,7 +180,7 @@ public function createTempFiles() {
     // Permanent file that is old.
     $perm_old = $fileRepository->writeData('', $destination);
     $connection->update('file_managed')
-      ->fields(['changed' => REQUEST_TIME - $this->config('system.file')->get('temporary_maximum_age') - 1])
+      ->fields(['changed' => $this->requestTime - $this->config('system.file')->get('temporary_maximum_age') - 1])
       ->condition('fid', $temp_old->id())
       ->execute();
     $this->assertFileExists($perm_old->getFileUri());
diff --git a/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php b/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
index 7480406bf8..201e26b3ba 100644
--- a/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
+++ b/core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php
@@ -64,7 +64,7 @@ public function testFileFields() {
     $this->assertFieldAccess('file', 'filesize', '4 bytes');
     $this->assertFieldAccess('file', 'status', 'Permanent');
     // $this->assertFieldAccess('file', 'created', \Drupal::service('date.formatter')->format(123456));
-    // $this->assertFieldAccess('file', 'changed', \Drupal::service('date.formatter')->format(REQUEST_TIME));
+    // $this->assertFieldAccess('file', 'changed', \Drupal::service('date.formatter')->format($this->requestTime));
   }
 
 }
diff --git a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
index ddcb064c0f..3835dba3c6 100644
--- a/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
+++ b/core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php
@@ -73,14 +73,14 @@ public function testHandlers() {
       ->fields([
         'uid' => $account->id(),
         'nid' => $nodes[0]->id(),
-        'timestamp' => REQUEST_TIME - 100,
+        'timestamp' => $this->requestTime - 100,
       ])->execute();
 
     $connection->insert('history')
       ->fields([
         'uid' => $account->id(),
         'nid' => $nodes[1]->id(),
-        'timestamp' => REQUEST_TIME + 100,
+        'timestamp' => $this->requestTime + 100,
       ])->execute();
 
     $column_map = [
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
index e6ddd71ee3..59379e6d7c 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
@@ -56,10 +56,10 @@ protected function setUp() {
     parent::setUp();
 
     // Setup timestamps to identify old and new translation sources.
-    $this->timestampOld = REQUEST_TIME - 300;
-    $this->timestampMedium = REQUEST_TIME - 200;
-    $this->timestampNew = REQUEST_TIME - 100;
-    $this->timestampNow = REQUEST_TIME;
+    $this->timestampOld = $this->requestTime - 300;
+    $this->timestampMedium = $this->requestTime - 200;
+    $this->timestampNew = $this->requestTime - 100;
+    $this->timestampNow = $this->requestTime;
 
     // Enable import of translations. By default this is disabled for automated
     // tests.
@@ -110,7 +110,7 @@ protected function addLanguage($langcode) {
    *   in source and translations strings.
    */
   protected function makePoFile($path, $filename, $timestamp = NULL, array $translations = []) {
-    $timestamp = $timestamp ? $timestamp : REQUEST_TIME;
+    $timestamp = $timestamp ? $timestamp : $this->requestTime;
     $path = 'public://' . $path;
     $text = '';
     $po_header = <<<EOF
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
index e59732f336..8c87501142 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php
@@ -60,7 +60,7 @@ public function testUpdateCron() {
     // Prepare for test: Simulate new translations being available.
     // Change the last updated timestamp of a translation file.
     $contrib_module_two_uri = 'public://local/contrib_module_two-8.x-2.0-beta4.de._po';
-    touch(\Drupal::service('file_system')->realpath($contrib_module_two_uri), REQUEST_TIME);
+    touch(\Drupal::service('file_system')->realpath($contrib_module_two_uri), $this->requestTime);
 
     // Prepare for test: Simulate that the file has not been checked for a long
     // time. Set the last_check timestamp to zero.
diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
index c1a561550d..c3e3238841 100644
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php
@@ -113,14 +113,14 @@ public function testInterface() {
     // Override Drupal core translation status as 'translations available'.
     $status = locale_translation_get_status();
     $status['drupal']['de']->type = 'local';
-    $status['drupal']['de']->files['local']->timestamp = REQUEST_TIME;
+    $status['drupal']['de']->files['local']->timestamp = $this->requestTime;
     $status['drupal']['de']->files['local']->info['version'] = '8.1.1';
     \Drupal::keyValue('locale.translation_status')->set('drupal', $status['drupal']);
 
     // Check if translations are available for Drupal core.
     $this->drupalGet('admin/reports/translations');
     $this->assertSession()->pageTextContains('Updates for: Drupal core');
-    $this->assertSession()->pageTextContains('Drupal core (' . $this->container->get('date.formatter')->format(REQUEST_TIME, 'html_date') . ')');
+    $this->assertSession()->pageTextContains('Drupal core (' . $this->container->get('date.formatter')->format($this->requestTime, 'html_date') . ')');
     $this->assertSession()->buttonExists('Update translations');
   }
 
diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
index 894bb59993..968fed82b4 100644
--- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
+++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php
@@ -146,7 +146,7 @@ public function testCreateLink() {
     $link = MenuLinkContent::create($options);
     $link->save();
     // Make sure the changed timestamp is set.
-    $this->assertEquals(REQUEST_TIME, $link->getChangedTime(), 'Creating a menu link sets the "changed" timestamp.');
+    $this->assertEquals($this->requestTime, $link->getChangedTime(), 'Creating a menu link sets the "changed" timestamp.');
     $options = [
       'title' => 'Test Link',
     ];
@@ -154,7 +154,7 @@ public function testCreateLink() {
     $link->changed->value = 0;
     $link->save();
     // Make sure the changed timestamp is updated.
-    $this->assertEquals(REQUEST_TIME, $link->getChangedTime(), 'Changing a menu link sets "changed" timestamp.');
+    $this->assertEquals($this->requestTime, $link->getChangedTime(), 'Changing a menu link sets "changed" timestamp.');
   }
 
   /**
diff --git a/core/modules/node/tests/src/Functional/NodeAdminTest.php b/core/modules/node/tests/src/Functional/NodeAdminTest.php
index 4b0412cc9b..4dbf6780f5 100644
--- a/core/modules/node/tests/src/Functional/NodeAdminTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAdminTest.php
@@ -83,7 +83,7 @@ protected function setUp(): void {
   public function testContentAdminSort() {
     $this->drupalLogin($this->adminUser);
 
-    $changed = REQUEST_TIME;
+    $changed = $this->requestTime;
     $connection = Database::getConnection();
     foreach (['dd', 'aa', 'DD', 'bb', 'cc', 'CC', 'AA', 'BB'] as $prefix) {
       $changed += 1000;
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
index 151bff2e03..5643fcefa2 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php
@@ -184,7 +184,7 @@ public function testRevisions() {
 
     // Set the revision timestamp to an older date to make sure that the
     // confirmation message correctly displays the stored revision date.
-    $old_revision_date = REQUEST_TIME - 86400;
+    $old_revision_date = $this->requestTime - 86400;
     Database::getConnection()->update('node_revision')
       ->condition('vid', $nodes[2]->getRevisionId())
       ->fields([
diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
index f22cc66912..abf784eaec 100644
--- a/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeRevisionsTest.php
@@ -206,7 +206,7 @@ public function testRevisions() {
 
     // Set the revision timestamp to an older date to make sure that the
     // confirmation message correctly displays the stored revision date.
-    $old_revision_date = REQUEST_TIME - 86400;
+    $old_revision_date = $this->requestTime - 86400;
     $connection->update('node_revision')
       ->condition('vid', $nodes[2]->getRevisionId())
       ->fields([
diff --git a/core/modules/node/tests/src/Functional/NodeSaveTest.php b/core/modules/node/tests/src/Functional/NodeSaveTest.php
index 8377b22058..768d2a74d9 100644
--- a/core/modules/node/tests/src/Functional/NodeSaveTest.php
+++ b/core/modules/node/tests/src/Functional/NodeSaveTest.php
@@ -92,8 +92,8 @@ public function testTimestamps() {
 
     Node::create($edit)->save();
     $node = $this->drupalGetNodeByTitle($edit['title']);
-    $this->assertEquals(REQUEST_TIME, $node->getCreatedTime(), 'Creating a node sets default "created" timestamp.');
-    $this->assertEquals(REQUEST_TIME, $node->getChangedTime(), 'Creating a node sets default "changed" timestamp.');
+    $this->assertEquals($this->requestTime, $node->getCreatedTime(), 'Creating a node sets default "created" timestamp.');
+    $this->assertEquals($this->requestTime, $node->getChangedTime(), 'Creating a node sets default "changed" timestamp.');
 
     // Store the timestamps.
     $created = $node->getCreatedTime();
diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
index 8934c958d9..bca1d2dae1 100644
--- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
+++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php
@@ -214,7 +214,7 @@ protected function doTestAuthoringInfo() {
       $user = $this->drupalCreateUser();
       $values[$langcode] = [
         'uid' => $user->id(),
-        'created' => REQUEST_TIME - mt_rand(0, 1000),
+        'created' => $this->requestTime - mt_rand(0, 1000),
         'sticky' => (bool) mt_rand(0, 1),
         'promote' => (bool) mt_rand(0, 1),
       ];
diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
index 1ee1b6606d..014887625d 100644
--- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
+++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php
@@ -96,7 +96,7 @@ public function testFrontPage() {
       $values['promote'] = TRUE;
       $values['status'] = TRUE;
       // Test descending sort order.
-      $values['created'] = REQUEST_TIME - $i;
+      $values['created'] = $this->requestTime - $i;
       // Test the sticky order.
       if ($i == 5) {
         $values['sticky'] = TRUE;
diff --git a/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php b/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php
index ea0cfe411a..d1c01a2bb9 100644
--- a/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php
+++ b/core/modules/node/tests/src/Functional/Views/NodeIntegrationTest.php
@@ -34,7 +34,7 @@ public function testNodeViewTypeArgument() {
 
       for ($j = 0; $j < 5; $j++) {
         // Ensure the right order of the nodes.
-        $node = $this->drupalCreateNode(['type' => $type->id(), 'created' => REQUEST_TIME - ($i * 5 + $j)]);
+        $node = $this->drupalCreateNode(['type' => $type->id(), 'created' => $this->requestTime - ($i * 5 + $j)]);
         $nodes[$type->id()][$node->id()] = $node;
         $all_nids[] = $node->id();
       }
diff --git a/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php b/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php
index 7fba6fbcdb..ffa9dfa64f 100644
--- a/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php
+++ b/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php
@@ -26,24 +26,24 @@ public function testViewAdd() {
     // Create two nodes with two revision.
     $node_storage = \Drupal::entityTypeManager()->getStorage('node');
     /** @var \Drupal\node\NodeInterface $node */
-    $node = $node_storage->create(['title' => $this->randomString(), 'type' => 'article', 'changed' => REQUEST_TIME + 40]);
+    $node = $node_storage->create(['title' => $this->randomString(), 'type' => 'article', 'changed' => $this->requestTime + 40]);
     $node->save();
 
     $node = $node->createDuplicate();
     $node->setNewRevision();
-    $node->changed->value = REQUEST_TIME + 20;
+    $node->changed->value = $this->requestTime + 20;
     $node->save();
 
-    $node = $node_storage->create(['title' => $this->randomString(), 'type' => 'article', 'changed' => REQUEST_TIME + 30]);
+    $node = $node_storage->create(['title' => $this->randomString(), 'type' => 'article', 'changed' => $this->requestTime + 30]);
     $node->save();
 
     $node = $node->createDuplicate();
     $node->setNewRevision();
-    $node->changed->value = REQUEST_TIME + 10;
+    $node->changed->value = $this->requestTime + 10;
     $node->save();
 
     $this->drupalCreateContentType(['type' => 'not-article']);
-    $node = $node_storage->create(['title' => $this->randomString(), 'type' => 'not-article', 'changed' => REQUEST_TIME + 80]);
+    $node = $node_storage->create(['title' => $this->randomString(), 'type' => 'not-article', 'changed' => $this->requestTime + 80]);
     $node->save();
 
     $type = [
diff --git a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
index 0a6a56cf96..61ca6a2c24 100644
--- a/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
+++ b/core/modules/node/tests/src/Kernel/Views/NodeViewsFieldAccessTest.php
@@ -68,7 +68,7 @@ public function testNodeFields() {
     $this->assertFieldAccess('node', 'sticky', 'Off');
 
     // $this->assertFieldAccess('node', 'created', \Drupal::service('date.formatter')->format(123456));
-    // $this->assertFieldAccess('node', 'changed', \Drupal::service('date.formatter')->format(REQUEST_TIME));
+    // $this->assertFieldAccess('node', 'changed', \Drupal::service('date.formatter')->format($this->requestTime));
   }
 
 }
diff --git a/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php b/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php
index 0e76f07a16..1f2119c8e0 100644
--- a/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php
+++ b/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php
@@ -202,7 +202,7 @@ public function testGetAliasByPathNoMatch() {
     // This needs to write out the cache.
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, [$language->getId() => [$path]], (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
+      ->with($this->cacheKey, [$language->getId() => [$path]], (int) $_SERVER['$this->requestTime'] + (60 * 60 * 24));
 
     $this->aliasManager->writeCache();
   }
@@ -240,7 +240,7 @@ public function testGetAliasByPathMatch() {
     // This needs to write out the cache.
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, [$language->getId() => [$path]], (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
+      ->with($this->cacheKey, [$language->getId() => [$path]], (int) $_SERVER['$this->requestTime'] + (60 * 60 * 24));
 
     $this->aliasManager->writeCache();
   }
diff --git a/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php b/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
index a8dbc5d130..0b5a2e8f7d 100644
--- a/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
+++ b/core/modules/search/tests/src/Functional/SearchMultilingualEntityTest.php
@@ -225,7 +225,7 @@ public function testMultilingualSearch() {
     // The request time is always the same throughout test runs. Update the
     // request time to a previous time, to simulate it having been marked
     // previously.
-    $current = REQUEST_TIME;
+    $current = $this->requestTime;
     $old = $current - 10;
     $connection = Database::getConnection();
     $connection->update('search_dataset')
diff --git a/core/modules/search/tests/src/Functional/SearchRankingTest.php b/core/modules/search/tests/src/Functional/SearchRankingTest.php
index d444d3e2fa..dceed0e3d1 100644
--- a/core/modules/search/tests/src/Functional/SearchRankingTest.php
+++ b/core/modules/search/tests/src/Functional/SearchRankingTest.php
@@ -75,7 +75,7 @@ public function testRankings() {
         'title' => 'Drupal rocks',
         'body' => [['value' => "Drupal's search rocks"]],
         // Node is one day old.
-        'created' => REQUEST_TIME - 24 * 3600,
+        'created' => $this->requestTime - 24 * 3600,
         'sticky' => 0,
         'promote' => 0,
       ];
@@ -93,7 +93,7 @@ public function testRankings() {
 
             case 'recent':
               // Node is 1 hour hold.
-              $settings['created'] = REQUEST_TIME - 3600;
+              $settings['created'] = $this->requestTime - 3600;
               break;
 
             case 'comments':
@@ -121,7 +121,7 @@ public function testRankings() {
     // counter for this node.
     $nid = $nodes['views'][1]->id();
     Database::getConnection()->insert('node_counter')
-      ->fields(['totalcount' => 5, 'daycount' => 5, 'timestamp' => REQUEST_TIME, 'nid' => $nid])
+      ->fields(['totalcount' => 5, 'daycount' => 5, 'timestamp' => $this->requestTime, 'nid' => $nid])
       ->execute();
 
     // Run cron to update the search index and comment/statistics totals.
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
index d943bcecf1..dec7a37ba1 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsAdminTest.php
@@ -166,7 +166,7 @@ public function testExpiredLogs() {
     $this->assertSession()->pageTextContains('1 view');
 
     // statistics_cron() will subtract
-    // statistics.settings:accesslog.max_lifetime config from REQUEST_TIME in
+    // statistics.settings:accesslog.max_lifetime config from $this->requestTime in
     // the delete query, so wait two secs here to make sure the access log will
     // be flushed for the node just hit.
     sleep(2);
diff --git a/core/modules/statistics/tests/src/Functional/StatisticsTokenReplaceTest.php b/core/modules/statistics/tests/src/Functional/StatisticsTokenReplaceTest.php
index 879f16cc90..23a4892459 100644
--- a/core/modules/statistics/tests/src/Functional/StatisticsTokenReplaceTest.php
+++ b/core/modules/statistics/tests/src/Functional/StatisticsTokenReplaceTest.php
@@ -30,14 +30,14 @@ public function testStatisticsTokenReplacement() {
 
     /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */
     $date_formatter = $this->container->get('date.formatter');
-    $request_time = \Drupal::time()->getRequestTime();
+    $$this->requestTime = \Drupal::time()->getRequestTime();
 
     // Generate and test tokens.
     $tests = [];
     $tests['[node:total-count]'] = 0;
     $tests['[node:day-count]'] = 0;
     $tests['[node:last-view]'] = 'never';
-    $tests['[node:last-view:short]'] = $date_formatter->format($request_time, 'short');
+    $tests['[node:last-view:short]'] = $date_formatter->format($$this->requestTime, 'short');
 
     foreach ($tests as $input => $expected) {
       $output = \Drupal::token()->replace($input, ['node' => $node], ['langcode' => $language_interface->getId()]);
diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php
index 0e0a46c16b..f8437c1219 100644
--- a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php
+++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php
@@ -27,7 +27,7 @@ class ChangedTestItem extends ChangedItem {
   public function preSave() {
     parent::preSave();
 
-    if ($this->value == REQUEST_TIME) {
+    if ($this->value == $this->requestTime) {
       // During a test the request time is immutable. To allow tests of the
       // algorithm of
       // Drupal\Core\Field\Plugin\Field\FieldType\ChangedItem::preSave() we need
diff --git a/core/modules/system/tests/src/Functional/System/CronRunTest.php b/core/modules/system/tests/src/Functional/System/CronRunTest.php
index 95d2611e67..420be4fb10 100644
--- a/core/modules/system/tests/src/Functional/System/CronRunTest.php
+++ b/core/modules/system/tests/src/Functional/System/CronRunTest.php
@@ -52,7 +52,7 @@ public function testCronRun() {
   /**
    * Ensure that the automated cron run module is working.
    *
-   * In these tests we do not use REQUEST_TIME to track start time, because we
+   * In these tests we do not use $this->requestTime to track start time, because we
    * need the exact time when cron is triggered.
    */
   public function testAutomatedCron() {
diff --git a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
index 7eef752060..598d73f1a5 100644
--- a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
+++ b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
@@ -138,14 +138,14 @@ public function testExceptions() {
     // The item should be left in the queue.
     $this->assertEquals(1, $queue->numberOfItems(), 'Failing item still in the queue after throwing an exception.');
 
-    // Expire the queue item manually. system_cron() relies in REQUEST_TIME to
+    // Expire the queue item manually. system_cron() relies in $this->requestTime to
     // find queue items whose expire field needs to be reset to 0. This is a
-    // Kernel test, so REQUEST_TIME won't change when cron runs.
+    // Kernel test, so $this->requestTime won't change when cron runs.
     // @see system_cron()
     // @see \Drupal\Core\Cron::processQueues()
     $this->connection->update('queue')
       ->condition('name', 'cron_queue_test_exception')
-      ->fields(['expire' => REQUEST_TIME - 1])
+      ->fields(['expire' => $this->requestTime - 1])
       ->execute();
     $this->cron->run();
     $this->assertEquals(2, \Drupal::state()->get('cron_queue_test_exception'));
diff --git a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
index e875c01011..220a2ef308 100644
--- a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
+++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTest.php
@@ -133,7 +133,7 @@ public function testSystemSiteTokenReplacement() {
    */
   public function testSystemDateTokenReplacement() {
     // Set time to one hour before request.
-    $date = REQUEST_TIME - 3600;
+    $date = $this->requestTime - 3600;
 
     // Generate and test tokens.
     $tests = [];
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
index 481a4c69d3..04a1e25bb7 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php
@@ -74,9 +74,9 @@ protected function setUp($import_test_views = TRUE): void {
     // Fix the created date to match the expectations of the order by in the
     // view. Node 1 should be the most recent node and node 6 should be the
     // oldest.
-    $request_time = \Drupal::time()->getRequestTime();
+    $$this->requestTime = \Drupal::time()->getRequestTime();
     foreach ($this->nodes as $i => $node) {
-      $node->setCreatedTime($request_time - $i)->save();
+      $node->setCreatedTime($$this->requestTime - $i)->save();
     }
   }
 
diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermFilterDepthTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermFilterDepthTest.php
index 51c7c53009..ee55877683 100644
--- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermFilterDepthTest.php
+++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermFilterDepthTest.php
@@ -75,9 +75,9 @@ protected function setUp($import_test_views = TRUE): void {
     // Fix the created date to match the expectations of the order by in the
     // view. Node 1 should be the most recent node and node 6 should be the
     // oldest.
-    $request_time = \Drupal::time()->getRequestTime();
+    $$this->requestTime = \Drupal::time()->getRequestTime();
     foreach ($this->nodes as $i => $node) {
-      $node->setCreatedTime($request_time - $i)->save();
+      $node->setCreatedTime($$this->requestTime - $i)->save();
     }
   }
 
diff --git a/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php b/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php
index 4b5118c8e9..a9d08292f0 100644
--- a/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php
+++ b/core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php
@@ -31,7 +31,7 @@ public function testUpdateDeleteFileIfStale() {
 
     // During testing, the file change and the stale checking occurs in the same
     // request, so the beginning of request will be before the file changes and
-    // REQUEST_TIME - $filectime is negative or zero. Set the maximum age to a
+    // $this->requestTime - $filectime is negative or zero. Set the maximum age to a
     // number greater than that.
     $this->config('system.file')
       ->set('temporary_maximum_age', 100000)
@@ -42,7 +42,7 @@ public function testUpdateDeleteFileIfStale() {
     $this->assertFalse($deleted);
     $this->assertFileExists($file_path);
 
-    // Set the maximum age to a number smaller than REQUEST_TIME - $filectime.
+    // Set the maximum age to a number smaller than $this->requestTime - $filectime.
     $this->config('system.file')
       ->set('temporary_maximum_age', -100000)
       ->save();
diff --git a/core/modules/user/tests/src/Functional/UserCreateTest.php b/core/modules/user/tests/src/Functional/UserCreateTest.php
index dee27b7054..263015d8ba 100644
--- a/core/modules/user/tests/src/Functional/UserCreateTest.php
+++ b/core/modules/user/tests/src/Functional/UserCreateTest.php
@@ -38,8 +38,8 @@ public function testUserAdd() {
     $user = $this->drupalCreateUser(['administer users']);
     $this->drupalLogin($user);
 
-    $this->assertEquals(REQUEST_TIME, $user->getCreatedTime(), 'Creating a user sets default "created" timestamp.');
-    $this->assertEquals(REQUEST_TIME, $user->getChangedTime(), 'Creating a user sets default "changed" timestamp.');
+    $this->assertEquals($this->requestTime, $user->getCreatedTime(), 'Creating a user sets default "created" timestamp.');
+    $this->assertEquals($this->requestTime, $user->getChangedTime(), 'Creating a user sets default "changed" timestamp.');
 
     // Create a field.
     $field_name = 'test_field';
diff --git a/core/modules/user/tests/src/Functional/UserEditTest.php b/core/modules/user/tests/src/Functional/UserEditTest.php
index 11533bfb2d..581902fd13 100644
--- a/core/modules/user/tests/src/Functional/UserEditTest.php
+++ b/core/modules/user/tests/src/Functional/UserEditTest.php
@@ -92,7 +92,7 @@ public function testUserEdit() {
     $this->assertSame(1, (int) \Drupal::database()->select('sessions', 's')->countQuery()->execute()->fetchField());
 
     // Make sure the changed timestamp is updated.
-    $this->assertEquals(REQUEST_TIME, $user1->getChangedTime(), 'Changing a user sets "changed" timestamp.');
+    $this->assertEquals($this->requestTime, $user1->getChangedTime(), 'Changing a user sets "changed" timestamp.');
 
     // Make sure the user can log in with their new password.
     $this->drupalLogout();
diff --git a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
index e984c466ed..2a388d9fe8 100644
--- a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
 
     // Set the last login time that is used to generate the one-time link so
     // that it is definitely over a second ago.
-    $account->login = REQUEST_TIME - mt_rand(10, 100000);
+    $account->login = $this->requestTime - mt_rand(10, 100000);
     Database::getConnection()->update('users_field_data')
       ->fields(['login' => $account->getLastLoginTime()])
       ->condition('uid', $account->id())
@@ -174,14 +174,14 @@ public function testUserPasswordReset() {
 
     // Create a password reset link as if the request time was 60 seconds older than the allowed limit.
     $timeout = $this->config('user.settings')->get('password_reset_timeout');
-    $bogus_timestamp = REQUEST_TIME - $timeout - 60;
+    $bogus_timestamp = $this->requestTime - $timeout - 60;
     $_uid = $this->account->id();
     $this->drupalGet("user/reset/$_uid/$bogus_timestamp/" . user_pass_rehash($this->account, $bogus_timestamp));
     $this->submitForm([], 'Log in');
     $this->assertSession()->pageTextContains('You have tried to use a one-time login link that has expired. Please request a new one using the form below.');
 
     // Create a user, block the account, and verify that a login link is denied.
-    $timestamp = REQUEST_TIME - 1;
+    $timestamp = $this->requestTime - 1;
     $blocked_account = $this->drupalCreateUser()->block();
     $blocked_account->save();
     $this->drupalGet("user/reset/" . $blocked_account->id() . "/$timestamp/" . user_pass_rehash($blocked_account, $timestamp));
@@ -219,7 +219,7 @@ public function testUserPasswordReset() {
     // Ensure blocked and deleted accounts can't access the user.reset.login
     // route.
     $this->drupalLogout();
-    $timestamp = REQUEST_TIME - 1;
+    $timestamp = $this->requestTime - 1;
     $blocked_account = $this->drupalCreateUser()->block();
     $blocked_account->save();
     $this->drupalGet("user/reset/" . $blocked_account->id() . "/$timestamp/" . user_pass_rehash($blocked_account, $timestamp) . '/login');
@@ -358,7 +358,7 @@ public function testUserPasswordResetLoggedIn() {
 
     // Logged in users should not be able to access the user.reset.login or the
     // user.reset.form routes.
-    $timestamp = REQUEST_TIME - 1;
+    $timestamp = $this->requestTime - 1;
     $this->drupalGet("user/reset/" . $this->account->id() . "/$timestamp/" . user_pass_rehash($this->account, $timestamp) . '/login');
     $this->assertSession()->statusCodeEquals(403);
     $this->drupalGet("user/reset/" . $this->account->id());
diff --git a/core/modules/user/tests/src/Functional/UserPictureTest.php b/core/modules/user/tests/src/Functional/UserPictureTest.php
index 615359a9f2..6b6abbd788 100644
--- a/core/modules/user/tests/src/Functional/UserPictureTest.php
+++ b/core/modules/user/tests/src/Functional/UserPictureTest.php
@@ -86,7 +86,7 @@ public function testCreateDeletePicture() {
     // would set the timestamp.
     Database::getConnection()->update('file_managed')
       ->fields([
-        'changed' => REQUEST_TIME - ($this->config('system.file')->get('temporary_maximum_age') + 1),
+        'changed' => $this->requestTime - ($this->config('system.file')->get('temporary_maximum_age') + 1),
       ])
       ->condition('fid', $file->id())
       ->execute();
diff --git a/core/modules/user/tests/src/Functional/UserRegistrationTest.php b/core/modules/user/tests/src/Functional/UserRegistrationTest.php
index bd4d375b89..b216598982 100644
--- a/core/modules/user/tests/src/Functional/UserRegistrationTest.php
+++ b/core/modules/user/tests/src/Functional/UserRegistrationTest.php
@@ -272,7 +272,7 @@ public function testRegistrationDefaultValues() {
     $this->assertEquals($name, $new_user->getAccountName(), 'Username matches.');
     $this->assertEquals($mail, $new_user->getEmail(), 'Email address matches.');
     // Verify that the creation time is correct.
-    $this->assertGreaterThan(REQUEST_TIME - 20, $new_user->getCreatedTime());
+    $this->assertGreaterThan($this->requestTime - 20, $new_user->getCreatedTime());
     $this->assertEquals($config_user_settings->get('register') == UserInterface::REGISTER_VISITORS ? 1 : 0, $new_user->isActive(), 'Correct status field.');
     $this->assertEquals($config_system_date->get('timezone.default'), $new_user->getTimezone(), 'Correct time zone field.');
     $this->assertEquals(\Drupal::languageManager()->getDefaultLanguage()->getId(), $new_user->langcode->value, 'Correct language field.');
diff --git a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
index 5813915b3a..5cdd69a066 100644
--- a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
+++ b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php
@@ -49,7 +49,7 @@ public function testChangedField() {
 
     $this->drupalGet($path, $options);
 
-    $this->assertSession()->pageTextContains('Updated date: ' . date('Y-m-d', REQUEST_TIME));
+    $this->assertSession()->pageTextContains('Updated date: ' . date('Y-m-d', $this->requestTime));
   }
 
 }
diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
index ee4e19b7a3..04890439e3 100644
--- a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
+++ b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
@@ -65,7 +65,7 @@ protected function setUp(): void {
 
     // Set the last login time that is used to generate the one-time link so
     // that it is definitely over a second ago.
-    $account->login = REQUEST_TIME - mt_rand(10, 100000);
+    $account->login = $this->requestTime - mt_rand(10, 100000);
     Database::getConnection()->update('users_field_data')
       ->fields(['login' => $account->getLastLoginTime()])
       ->condition('uid', $account->id())
diff --git a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
index a11aedd249..2991160ff7 100644
--- a/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/UserViewsFieldAccessTest.php
@@ -61,7 +61,7 @@ public function testUserFields() {
     $this->assertFieldAccess('user', 'timezone', 'ut1');
     $this->assertFieldAccess('user', 'status', 'On');
     // $this->assertFieldAccess('user', 'created', \Drupal::service('date.formatter')->format(123456));
-    // $this->assertFieldAccess('user', 'changed', \Drupal::service('date.formatter')->format(REQUEST_TIME));
+    // $this->assertFieldAccess('user', 'changed', \Drupal::service('date.formatter')->format($this->requestTime));
   }
 
 }
diff --git a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
index 90551a75c1..91ccee76ba 100644
--- a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
+++ b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php
@@ -72,7 +72,7 @@ protected function setUp(): void {
    * Tests the Who's Online block.
    */
   public function testWhosOnlineBlock() {
-    $request_time = \Drupal::time()->getRequestTime();
+    $$this->requestTime = \Drupal::time()->getRequestTime();
     // Generate users.
     $user1 = User::create([
       'name' => 'user1',
@@ -80,7 +80,7 @@ public function testWhosOnlineBlock() {
     ]);
     $user1->addRole('administrator');
     $user1->activate();
-    $user1->setLastAccessTime($request_time);
+    $user1->setLastAccessTime($$this->requestTime);
     $user1->save();
 
     $user2 = User::create([
@@ -88,7 +88,7 @@ public function testWhosOnlineBlock() {
       'mail' => 'user2@example.com',
     ]);
     $user2->activate();
-    $user2->setLastAccessTime($request_time + 1);
+    $user2->setLastAccessTime($$this->requestTime + 1);
     $user2->save();
 
     $user3 = User::create([
@@ -97,7 +97,7 @@ public function testWhosOnlineBlock() {
     ]);
     $user3->activate();
     // Insert an inactive user who should not be seen in the block.
-    $inactive_time = $request_time - (60 * 60);
+    $inactive_time = $$this->requestTime - (60 * 60);
     $user3->setLastAccessTime($inactive_time);
     $user3->save();
 
diff --git a/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php b/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php
index e40fbb959c..1c12035bc4 100644
--- a/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php
+++ b/core/modules/views/src/Tests/AssertViewsCacheTagsTrait.php
@@ -45,7 +45,7 @@ protected function assertViewsCacheTags(ViewExecutable $view, $expected_results_
     /** @var \Symfony\Component\HttpFoundation\RequestStack $request_stack */
     $request_stack = \Drupal::service('request_stack');
     $request = Request::createFromGlobals();
-    $request->server->set('REQUEST_TIME', REQUEST_TIME);
+    $request->server->set('$this->requestTime', $this->requestTime);
     $view->setRequest($request);
     $request_stack->push($request);
     $renderer->renderRoot($build);
@@ -125,7 +125,7 @@ protected function assertViewsCacheTagsFromStaticRenderArray(ViewExecutable $vie
     /** @var \Symfony\Component\HttpFoundation\RequestStack $request_stack */
     $request_stack = \Drupal::service('request_stack');
     $request = new Request();
-    $request->server->set('REQUEST_TIME', REQUEST_TIME);
+    $request->server->set('$this->requestTime', $this->requestTime);
     $request_stack->push($request);
     $renderer->renderRoot($build);
 
diff --git a/core/modules/views/tests/src/Functional/BulkFormTest.php b/core/modules/views/tests/src/Functional/BulkFormTest.php
index 4e515c6aa6..98bc3c12ef 100644
--- a/core/modules/views/tests/src/Functional/BulkFormTest.php
+++ b/core/modules/views/tests/src/Functional/BulkFormTest.php
@@ -41,7 +41,7 @@ public function testBulkForm() {
     for ($i = 0; $i < 10; $i++) {
       // Ensure nodes are sorted in the same order they are inserted in the
       // array.
-      $timestamp = REQUEST_TIME - $i;
+      $timestamp = $this->requestTime - $i;
       $nodes[] = $this->drupalCreateNode([
         'title' => 'Node ' . $i,
         'sticky' => FALSE,
diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
index d2bae2d524..c175fcd81f 100644
--- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php
+++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php
@@ -87,7 +87,7 @@ protected function setUp($import_test_views = TRUE): void {
     $this->createEntityReferenceField('node', 'page', $field_name, NULL, 'taxonomy_term', 'default', $handler_settings, FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
 
     // Create a time in the past for the archive.
-    $time = REQUEST_TIME - 3600;
+    $time = $this->requestTime - 3600;
 
     $this->addDefaultCommentField('node', 'page');
 
@@ -208,7 +208,7 @@ public function testArchiveView() {
     $columns = ['nid', 'created_year_month', 'num_records'];
     $column_map = array_combine($columns, $columns);
     // Create time of additional nodes created in the setup method.
-    $created_year_month = date('Ym', REQUEST_TIME - 3600);
+    $created_year_month = date('Ym', $this->requestTime - 3600);
     $expected_result = [
       [
         'nid' => 1,
diff --git a/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php b/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php
index 0a17137271..6170dcbe43 100644
--- a/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php
@@ -29,14 +29,14 @@ public function testItemsPerPage() {
 
     // Create articles, each with a different creation time so that we can do a
     // meaningful sort.
-    $node1 = $this->drupalCreateNode(['type' => 'article', 'created' => REQUEST_TIME]);
-    $node2 = $this->drupalCreateNode(['type' => 'article', 'created' => REQUEST_TIME + 1]);
-    $node3 = $this->drupalCreateNode(['type' => 'article', 'created' => REQUEST_TIME + 2]);
-    $node4 = $this->drupalCreateNode(['type' => 'article', 'created' => REQUEST_TIME + 3]);
-    $node5 = $this->drupalCreateNode(['type' => 'article', 'created' => REQUEST_TIME + 4]);
+    $node1 = $this->drupalCreateNode(['type' => 'article', 'created' => $this->requestTime]);
+    $node2 = $this->drupalCreateNode(['type' => 'article', 'created' => $this->requestTime + 1]);
+    $node3 = $this->drupalCreateNode(['type' => 'article', 'created' => $this->requestTime + 2]);
+    $node4 = $this->drupalCreateNode(['type' => 'article', 'created' => $this->requestTime + 3]);
+    $node5 = $this->drupalCreateNode(['type' => 'article', 'created' => $this->requestTime + 4]);
 
     // Create a page. This should never appear in the view created below.
-    $page_node = $this->drupalCreateNode(['type' => 'page', 'created' => REQUEST_TIME + 2]);
+    $page_node = $this->drupalCreateNode(['type' => 'page', 'created' => $this->requestTime + 2]);
 
     // Create a view that sorts newest first, and shows 4 items in the page and
     // 3 in the block.
diff --git a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php
index fa8355a7d0..3366b3b17f 100644
--- a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php
@@ -22,7 +22,7 @@ public function testPager() {
     // conditions that are meaningful for the use of a pager.
     $this->drupalCreateContentType(['type' => 'page']);
     for ($i = 0; $i < 12; $i++) {
-      $this->drupalCreateNode(['created' => REQUEST_TIME - $i]);
+      $this->drupalCreateNode(['created' => $this->requestTime - $i]);
     }
 
     // Make a View that uses a pager.
diff --git a/core/modules/views/tests/src/Functional/Wizard/SortingTest.php b/core/modules/views/tests/src/Functional/Wizard/SortingTest.php
index b52b3f73aa..32a7717331 100644
--- a/core/modules/views/tests/src/Functional/Wizard/SortingTest.php
+++ b/core/modules/views/tests/src/Functional/Wizard/SortingTest.php
@@ -27,9 +27,9 @@ public function testSorting() {
     // Create nodes, each with a different creation time so that we can do a
     // meaningful sort.
     $this->drupalCreateContentType(['type' => 'page']);
-    $node1 = $this->drupalCreateNode(['created' => REQUEST_TIME]);
-    $node2 = $this->drupalCreateNode(['created' => REQUEST_TIME + 1]);
-    $node3 = $this->drupalCreateNode(['created' => REQUEST_TIME + 2]);
+    $node1 = $this->drupalCreateNode(['created' => $this->requestTime]);
+    $node2 = $this->drupalCreateNode(['created' => $this->requestTime + 1]);
+    $node3 = $this->drupalCreateNode(['created' => $this->requestTime + 2]);
 
     // Create a view that sorts oldest first.
     $view1 = [];
diff --git a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
index f0ea436c11..5c6894f074 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php
@@ -39,8 +39,8 @@ protected function setUp(): void {
 
     // Create a Content type and two test nodes.
     $this->createContentType(['type' => 'page']);
-    $this->createNode(['title' => 'Page A', 'changed' => REQUEST_TIME]);
-    $this->createNode(['title' => 'Page B', 'changed' => REQUEST_TIME + 1000]);
+    $this->createNode(['title' => 'Page A', 'changed' => $this->requestTime]);
+    $this->createNode(['title' => 'Page B', 'changed' => $this->requestTime + 1000]);
 
     // Create a user privileged enough to view content.
     $user = $this->drupalCreateUser([
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
index 693d78f689..5efa1ed919 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php
@@ -92,21 +92,21 @@ protected function setUp($import_test_views = TRUE): void {
       'title' => 'bazs',
       'status' => 1,
       'uid' => $admin->id(),
-      'created' => REQUEST_TIME - 10,
+      'created' => $this->requestTime - 10,
     ]);
     $this->node2 = $this->createNode([
       'type' => 'foo',
       'title' => 'foos',
       'status' => 1,
       'uid' => $admin->id(),
-      'created' => REQUEST_TIME - 5,
+      'created' => $this->requestTime - 5,
     ]);
     $this->node3 = $this->createNode([
       'type' => 'bar',
       'title' => 'bars',
       'status' => 1,
       'uid' => $admin->id(),
-      'created' => REQUEST_TIME,
+      'created' => $this->requestTime,
     ]);
 
     // Now create a user with the ability to edit bar but not foo.
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
index 27428107d7..a9e9c92cd6 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php
@@ -88,7 +88,7 @@ protected function setUp($import_test_views = TRUE): void {
       $this->testUsers[$i] = User::create([
         'name' => 'test ' . $i,
         'timezone' => User::getAllowedTimezones()[$i],
-        'created' => REQUEST_TIME - rand(0, 3600),
+        'created' => $this->requestTime - rand(0, 3600),
       ]);
       $this->testUsers[$i]->save();
     }
diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
index 7bab5e5c50..fdd85bc8bf 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
@@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE): void {
     $this->installEntitySchema('user');
 
     // Setup the current time properly.
-    \Drupal::request()->server->set('REQUEST_TIME', time());
+    \Drupal::request()->server->set('$this->requestTime', time());
   }
 
   /**
diff --git a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
index 480b679537..8957886374 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
@@ -97,12 +97,12 @@ public function testIsLocked() {
     $this->assertFalse($view_ui->isLocked());
 
     // Set the lock object with a different owner than the mocked account above.
-    $lock = new Lock(2, (int) $_SERVER['REQUEST_TIME']);
+    $lock = new Lock(2, (int) $_SERVER['$this->requestTime']);
     $view_ui->setLock($lock);
     $this->assertTrue($view_ui->isLocked());
 
     // Set a different lock object with the same object as the mocked account.
-    $lock = new Lock(1, (int) $_SERVER['REQUEST_TIME']);
+    $lock = new Lock(1, (int) $_SERVER['$this->requestTime']);
     $view_ui->setLock($lock);
     $this->assertFalse($view_ui->isLocked());
 
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
index 8380cf4333..edf45f8cf7 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
@@ -138,28 +138,28 @@ public function testSetGet() {
     $this->assertSame($with_backslash, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
     // We need to round because microtime may be rounded up in the backend.
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $cached->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $cached->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $cached->created);
     $this->assertEquals(Cache::PERMANENT, $cached->expire, 'Expire time is correct.');
 
     $this->assertFalse($backend->get('test2'), "Backend does not contain data for cache id test2.");
-    $backend->set('test2', ['value' => 3], REQUEST_TIME + 3);
+    $backend->set('test2', ['value' => 3], $this->requestTime + 3);
     $cached = $backend->get('test2');
     $this->assertIsObject($cached);
     $this->assertSame(['value' => 3], $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $cached->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $cached->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $cached->created);
-    $this->assertEquals(REQUEST_TIME + 3, $cached->expire, 'Expire time is correct.');
+    $this->assertEquals($this->requestTime + 3, $cached->expire, 'Expire time is correct.');
 
-    $backend->set('test3', 'foobar', REQUEST_TIME - 3);
+    $backend->set('test3', 'foobar', $this->requestTime - 3);
     $this->assertFalse($backend->get('test3'), 'Invalid item not returned.');
     $cached = $backend->get('test3', TRUE);
     $this->assertIsObject($cached);
     $this->assertFalse($cached->valid, 'Item is marked as valid.');
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $cached->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $cached->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $cached->created);
-    $this->assertEquals(REQUEST_TIME - 3, $cached->expire, 'Expire time is correct.');
+    $this->assertEquals($this->requestTime - 3, $cached->expire, 'Expire time is correct.');
 
     $this->assertFalse($backend->get('test4'), "Backend does not contain data for cache id test4.");
     $with_eof = ['foo' => "\nEOF\ndata"];
@@ -168,7 +168,7 @@ public function testSetGet() {
     $this->assertIsObject($cached);
     $this->assertSame($with_eof, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $cached->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $cached->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $cached->created);
     $this->assertEquals(Cache::PERMANENT, $cached->expire, 'Expire time is correct.');
 
@@ -179,7 +179,7 @@ public function testSetGet() {
     $this->assertIsObject($cached);
     $this->assertSame($with_eof_and_semicolon, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $cached->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $cached->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $cached->created);
     $this->assertEquals(Cache::PERMANENT, $cached->expire, 'Expire time is correct.');
 
@@ -322,7 +322,7 @@ public function testGetMultiple() {
     $this->assertArrayHasKey('test7', $ret, "Existing cache id test7 is set.");
     // Test return - ensure that objects has expected properties.
     $this->assertTrue($ret['test2']->valid, 'Item is marked as valid.');
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $ret['test2']->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $ret['test2']->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $ret['test2']->created);
     $this->assertEquals(Cache::PERMANENT, $ret['test2']->expire, 'Expire time is correct.');
     // Test return - ensure it does not contain nonexistent cache ids.
@@ -384,7 +384,7 @@ public function testGetMultiple() {
   public function testSetMultiple() {
     $backend = $this->getCacheBackend();
 
-    $future_expiration = REQUEST_TIME + 100;
+    $future_expiration = $this->requestTime + 100;
 
     // Set multiple testing keys.
     $backend->set('cid_1', 'Some other value');
@@ -401,7 +401,7 @@ public function testSetMultiple() {
 
     $this->assertEquals($items['cid_1']['data'], $cached['cid_1']->data, 'Over-written cache item set correctly.');
     $this->assertTrue($cached['cid_1']->valid, 'Item is marked as valid.');
-    $this->assertGreaterThanOrEqual(REQUEST_TIME, $cached['cid_1']->created);
+    $this->assertGreaterThanOrEqual($this->requestTime, $cached['cid_1']->created);
     $this->assertLessThanOrEqual(round(microtime(TRUE), 3), $cached['cid_1']->created);
     $this->assertEquals(CacheBackendInterface::CACHE_PERMANENT, $cached['cid_1']->expire, 'Cache expiration defaults to permanent.');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
index c60c16413c..8ec89a02a7 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php
@@ -76,7 +76,7 @@ public function testChanged() {
     $entity->save();
 
     $this->assertTrue(
-      $entity->getChangedTime() >= REQUEST_TIME,
+      $entity->getChangedTime() >= $this->requestTime,
       'Changed time of original language is valid.'
     );
 
@@ -86,7 +86,7 @@ public function testChanged() {
     // between the created time and now.
     $this->assertTrue(
       ($entity->getChangedTime() >= $entity->get('created')->value) &&
-      (($entity->getChangedTime() - $entity->get('created')->value) <= time() - REQUEST_TIME),
+      (($entity->getChangedTime() - $entity->get('created')->value) <= time() - $this->requestTime),
       'Changed and created time of original language can be assumed to be identical.'
     );
 
@@ -254,7 +254,7 @@ public function testRevisionChanged() {
     $entity->save();
 
     $this->assertTrue(
-      $entity->getChangedTime() >= REQUEST_TIME,
+      $entity->getChangedTime() >= $this->requestTime,
       'Changed time of original language is valid.'
     );
 
@@ -263,7 +263,7 @@ public function testRevisionChanged() {
     // timestamp every time.
     $this->assertTrue(
       ($entity->getChangedTime() >= $entity->get('created')->value) &&
-      (($entity->getChangedTime() - $entity->get('created')->value) <= time() - REQUEST_TIME),
+      (($entity->getChangedTime() - $entity->get('created')->value) <= time() - $this->requestTime),
       'Changed and created time of original language can be assumed to be identical.'
     );
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
index a77b0eb5fd..a878c0560f 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityCrudHookTest.php
@@ -162,8 +162,8 @@ public function testCommentHooks() {
       'promote' => 0,
       'sticky' => 0,
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
-      'created' => REQUEST_TIME,
-      'changed' => REQUEST_TIME,
+      'created' => $this->requestTime,
+      'changed' => $this->requestTime,
     ]);
     $node->save();
     $nid = $node->id();
@@ -177,8 +177,8 @@ public function testCommentHooks() {
       'field_name' => 'comment',
       'uid' => $account->id(),
       'subject' => 'Test comment',
-      'created' => REQUEST_TIME,
-      'changed' => REQUEST_TIME,
+      'created' => $this->requestTime,
+      'changed' => $this->requestTime,
       'status' => 1,
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
     ]);
@@ -244,8 +244,8 @@ public function testFileHooks() {
       'filemime' => 'text/plain',
       'filesize' => filesize($url),
       'status' => 1,
-      'created' => REQUEST_TIME,
-      'changed' => REQUEST_TIME,
+      'created' => $this->requestTime,
+      'changed' => $this->requestTime,
     ]);
 
     $this->assertHookMessageOrder([
@@ -307,8 +307,8 @@ public function testNodeHooks() {
       'promote' => 0,
       'sticky' => 0,
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
-      'created' => REQUEST_TIME,
-      'changed' => REQUEST_TIME,
+      'created' => $this->requestTime,
+      'changed' => $this->requestTime,
     ]);
 
     $this->assertHookMessageOrder([
@@ -492,7 +492,7 @@ public function testUserHooks() {
     $account = User::create([
       'name' => 'Test user',
       'mail' => 'test@example.com',
-      'created' => REQUEST_TIME,
+      'created' => $this->requestTime,
       'status' => 1,
       'language' => 'en',
     ]);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
index 1d0aa063fa..777addfd09 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
@@ -64,7 +64,7 @@ public function testConstraintValidation() {
     $violations = $entity->validate();
     $this->assertEquals(0, $violations->count(), 'Validation passed.');
     $entity->save();
-    $entity->changed->value = REQUEST_TIME - 86400;
+    $entity->changed->value = $this->requestTime - 86400;
     $violations = $entity->validate();
     $this->assertEquals(1, $violations->count(), 'Validation failed.');
     $this->assertEquals('The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved.', $violations[0]->getMessage());
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
index a8a0239110..8a863c1c4d 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
@@ -43,7 +43,7 @@ public function testGarbageCollection() {
             'collection' => $collection,
           ])
         ->fields([
-            'expire' => REQUEST_TIME - 1,
+            'expire' => $this->requestTime - 1,
           ])
         ->execute();
     }
diff --git a/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
index d1b16c59de..2bda90e2e9 100644
--- a/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
@@ -102,7 +102,7 @@ public function testSharedTempStore() {
     // Now manually expire the item (this is not exposed by the API) and then
     // assert it is no longer accessible.
     $database->update('key_value_expire')
-      ->fields(['expire' => REQUEST_TIME - 1])
+      ->fields(['expire' => $this->requestTime - 1])
       ->condition('collection', "tempstore.shared.$collection")
       ->condition('name', $key)
       ->execute();
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index a87004ead6..da0af8baf6 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -199,12 +199,12 @@ public function testGetAndSet() {
     $this->assertNull($typed_data->getDateTime());
 
     // Timestamp type.
-    $value = REQUEST_TIME;
+    $value = $this->requestTime;
     $typed_data = $this->createTypedData(['type' => 'timestamp'], $value);
     $this->assertInstanceOf(DateTimeInterface::class, $typed_data);
     $this->assertSame($typed_data->getValue(), $value, 'Timestamp value was fetched.');
     $this->assertEquals(0, $typed_data->validate()->count());
-    $new_value = REQUEST_TIME + 1;
+    $new_value = $this->requestTime + 1;
     $typed_data->setValue($new_value);
     $this->assertSame($typed_data->getValue(), $new_value, 'Timestamp value was changed and set.');
     $this->assertEquals(0, $typed_data->validate()->count());
@@ -214,10 +214,10 @@ public function testGetAndSet() {
     $typed_data->setValue('invalid');
     $this->assertEquals(1, $typed_data->validate()->count(), 'Validation detected invalid value.');
     // Check implementation of DateTimeInterface.
-    $typed_data = $this->createTypedData(['type' => 'timestamp'], REQUEST_TIME);
+    $typed_data = $this->createTypedData(['type' => 'timestamp'], $this->requestTime);
     $this->assertInstanceOf(DrupalDateTime::class, $typed_data->getDateTime());
-    $typed_data->setDateTime(DrupalDateTime::createFromTimestamp(REQUEST_TIME + 1));
-    $this->assertEquals(REQUEST_TIME + 1, $typed_data->getValue());
+    $typed_data->setDateTime(DrupalDateTime::createFromTimestamp($this->requestTime + 1));
+    $this->assertEquals($this->requestTime + 1, $typed_data->getValue());
     $typed_data->setValue(NULL);
     $this->assertNull($typed_data->getDateTime());
 
diff --git a/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php b/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
index 98dc0e6b53..b0c58be05a 100644
--- a/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
+++ b/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
@@ -50,7 +50,7 @@ public function testGetRequestTime() {
     $expected = 12345678;
 
     $request = Request::createFromGlobals();
-    $request->server->set('REQUEST_TIME', $expected);
+    $request->server->set('$this->requestTime', $expected);
 
     // Mocks a the request stack getting the current request.
     $this->requestStack->expects($this->any())
@@ -69,7 +69,7 @@ public function testGetRequestMicroTime() {
     $expected = 1234567.89;
 
     $request = Request::createFromGlobals();
-    $request->server->set('REQUEST_TIME_FLOAT', $expected);
+    $request->server->set('$this->requestTime_FLOAT', $expected);
 
     // Mocks a the request stack getting the current request.
     $this->requestStack->expects($this->any())
@@ -84,9 +84,9 @@ public function testGetRequestMicroTime() {
    */
   public function testGetRequestTimeNoRequest() {
     $expected = 12345678;
-    unset($_SERVER['REQUEST_TIME']);
+    unset($_SERVER['$this->requestTime']);
     $this->assertEquals($expected, $this->time->getRequestTime());
-    $_SERVER['REQUEST_TIME'] = 23456789;
+    $_SERVER['$this->requestTime'] = 23456789;
     $this->assertEquals(23456789, $this->time->getRequestTime());
   }
 
@@ -95,9 +95,9 @@ public function testGetRequestTimeNoRequest() {
    */
   public function testGetRequestMicroTimeNoRequest() {
     $expected = 1234567.89;
-    unset($_SERVER['REQUEST_TIME_FLOAT']);
+    unset($_SERVER['$this->requestTime_FLOAT']);
     $this->assertEquals($expected, $this->time->getRequestMicroTime());
-    $_SERVER['REQUEST_TIME_FLOAT'] = 2345678.90;
+    $_SERVER['$this->requestTime_FLOAT'] = 2345678.90;
     $this->assertEquals(2345678.90, $this->time->getRequestMicroTime());
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
index 2c7c041a6d..53df92c468 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
@@ -114,7 +114,7 @@ public function testGetFromCache() {
 
     $cache = (object) [
       'data' => [$key => $value],
-      'created' => (int) $_SERVER['REQUEST_TIME'],
+      'created' => (int) $_SERVER['$this->requestTime'],
     ];
     $this->cacheBackend->expects($this->once())
       ->method('get')
@@ -226,11 +226,11 @@ public function testUpdateCacheInvalidatedConflict() {
       ->willReturnOnConsecutiveCalls(
         (object) [
           'data' => [$key => $value],
-          'created' => (int) $_SERVER['REQUEST_TIME'],
+          'created' => (int) $_SERVER['$this->requestTime'],
         ],
         (object) [
           'data' => [$key => $value],
-          'created' => (int) $_SERVER['REQUEST_TIME'] + 1,
+          'created' => (int) $_SERVER['$this->requestTime'] + 1,
         ],
       );
 
@@ -275,7 +275,7 @@ public function testUpdateCacheMerge() {
       ->will($this->returnValue(TRUE));
     $cache = (object) [
       'data' => ['other key' => 'other value'],
-      'created' => (int) $_SERVER['REQUEST_TIME'] + 1,
+      'created' => (int) $_SERVER['$this->requestTime'] + 1,
     ];
     $this->cacheBackend->expects($this->once())
       ->method('get')
@@ -301,7 +301,7 @@ public function testUpdateCacheDelete() {
 
     $cache = (object) [
       'data' => [$key => $value],
-      'created' => (int) $_SERVER['REQUEST_TIME'],
+      'created' => (int) $_SERVER['$this->requestTime'],
     ];
     // Set up mock expectation, on the second call the with the second argument
     // set to TRUE because we triggered a cache invalidation.
diff --git a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
index 8f203b0f16..b15ada727a 100644
--- a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
@@ -40,7 +40,7 @@ public function testGetDoesNotHitConsistentBackend() {
     $consistent_cache = $this->createMock('Drupal\Core\Cache\CacheBackendInterface');
     $timestamp_cid = ChainedFastBackend::LAST_WRITE_TIMESTAMP_PREFIX . 'cache_foo';
     // Use the request time because that is what we will be comparing against.
-    $timestamp_item = (object) ['cid' => $timestamp_cid, 'data' => (int) $_SERVER['REQUEST_TIME'] - 60];
+    $timestamp_item = (object) ['cid' => $timestamp_cid, 'data' => (int) $_SERVER['$this->requestTime'] - 60];
     $consistent_cache->expects($this->once())
       ->method('get')->with($timestamp_cid)
       ->will($this->returnValue($timestamp_item));
diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
index 561f2b0d08..2a26441dd8 100644
--- a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
+++ b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php
@@ -179,7 +179,7 @@ public function testGetSampleDateFormats() {
    */
   public function testFormatTimeDiffUntil() {
     $expected = '1 second';
-    $request_time = $this->createTimestamp('2013-12-11 10:09:08');
+    $$this->requestTime = $this->createTimestamp('2013-12-11 10:09:08');
     $timestamp = $this->createTimestamp('2013-12-11 10:09:09');
     $options = [];
 
@@ -188,12 +188,12 @@ public function testFormatTimeDiffUntil() {
       ->expects($this->exactly(2))
       ->method('formatDiff')
       ->willReturnMap([
-        [$timestamp, $request_time, $options, $expected],
-        [$timestamp, $request_time, $options + ['return_as_object' => TRUE], new FormattedDateDiff('1 second', 1)],
+        [$timestamp, $$this->requestTime, $options, $expected],
+        [$timestamp, $$this->requestTime, $options + ['return_as_object' => TRUE], new FormattedDateDiff('1 second', 1)],
       ]);
 
     $request = Request::createFromGlobals();
-    $request->server->set('REQUEST_TIME', $request_time);
+    $request->server->set('$this->requestTime', $$this->requestTime);
     // Mocks a the request stack getting the current request.
     $this->requestStack->expects($this->any())
       ->method('getCurrentRequest')
@@ -213,7 +213,7 @@ public function testFormatTimeDiffUntil() {
   public function testFormatTimeDiffSince() {
     $expected = '1 second';
     $timestamp = $this->createTimestamp('2013-12-11 10:09:07');
-    $request_time = $this->createTimestamp('2013-12-11 10:09:08');
+    $$this->requestTime = $this->createTimestamp('2013-12-11 10:09:08');
     $options = [];
 
     // Mocks the formatDiff function of the dateformatter object.
@@ -221,12 +221,12 @@ public function testFormatTimeDiffSince() {
       ->expects($this->exactly(2))
       ->method('formatDiff')
       ->willReturnMap([
-        [$request_time, $timestamp, $options, $expected],
-        [$request_time, $timestamp, $options + ['return_as_object' => TRUE], new FormattedDateDiff('1 second', 1)],
+        [$$this->requestTime, $timestamp, $options, $expected],
+        [$$this->requestTime, $timestamp, $options + ['return_as_object' => TRUE], new FormattedDateDiff('1 second', 1)],
       ]);
 
     $request = Request::createFromGlobals();
-    $request->server->set('REQUEST_TIME', $request_time);
+    $request->server->set('$this->requestTime', $$this->requestTime);
     // Mocks a the request stack getting the current request.
     $this->requestStack->expects($this->any())
       ->method('getCurrentRequest')
@@ -271,7 +271,7 @@ public function testFormatDiff($expected, $max_age, $timestamp1, $timestamp2, $o
    */
   public function providerTestFormatDiff() {
     // This is the fixed request time in the test.
-    $request_time = $this->createTimestamp('2013-12-11 10:09:08');
+    $$this->requestTime = $this->createTimestamp('2013-12-11 10:09:08');
 
     $granularity_3 = ['granularity' => 3];
     $granularity_4 = ['granularity' => 4];
@@ -283,103 +283,103 @@ public function providerTestFormatDiff() {
 
     $data = [
       // Checks for equal timestamps.
-      ['0 seconds', 0, $request_time, $request_time],
+      ['0 seconds', 0, $$this->requestTime, $$this->requestTime],
 
       // Checks for seconds only.
-      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $request_time],
-      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $request_time],
-      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $request_time, $granularity_3 + $langcode_en],
-      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $request_time, $granularity_4 + $langcode_lolspeak],
-      ['2 seconds', 1, $this->createTimestamp('2013-12-11 10:09:06'), $request_time],
-      ['59 seconds', 1, $this->createTimestamp('2013-12-11 10:08:09'), $request_time],
-      ['59 seconds', 1, $this->createTimestamp('2013-12-11 10:08:09'), $request_time],
+      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $$this->requestTime],
+      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $$this->requestTime],
+      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $$this->requestTime, $granularity_3 + $langcode_en],
+      ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:07'), $$this->requestTime, $granularity_4 + $langcode_lolspeak],
+      ['2 seconds', 1, $this->createTimestamp('2013-12-11 10:09:06'), $$this->requestTime],
+      ['59 seconds', 1, $this->createTimestamp('2013-12-11 10:08:09'), $$this->requestTime],
+      ['59 seconds', 1, $this->createTimestamp('2013-12-11 10:08:09'), $$this->requestTime],
 
       // Checks for minutes and possibly seconds.
-      ['1 minute', 60, $this->createTimestamp('2013-12-11 10:08:08'), $request_time],
-      ['1 minute', 60, $this->createTimestamp('2013-12-11 10:08:08'), $request_time],
-      ['1 minute 1 second', 1, $this->createTimestamp('2013-12-11 10:08:07'), $request_time],
-      ['1 minute 59 seconds', 1, $this->createTimestamp('2013-12-11 10:07:09'), $request_time],
-      ['2 minutes', 60, $this->createTimestamp('2013-12-11 10:07:08'), $request_time],
-      ['2 minutes 1 second', 1, $this->createTimestamp('2013-12-11 10:07:07'), $request_time],
-      ['2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-11 10:07:06'), $request_time],
-      ['2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-11 10:07:06'), $request_time, $granularity_3],
-      ['2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-11 10:07:06'), $request_time, $granularity_4],
-      ['30 minutes', 60, $this->createTimestamp('2013-12-11 09:39:08'), $request_time],
-      ['59 minutes 59 seconds', 1, $this->createTimestamp('2013-12-11 09:09:09'), $request_time],
-      ['59 minutes 59 seconds', 1, $this->createTimestamp('2013-12-11 09:09:09'), $request_time],
+      ['1 minute', 60, $this->createTimestamp('2013-12-11 10:08:08'), $$this->requestTime],
+      ['1 minute', 60, $this->createTimestamp('2013-12-11 10:08:08'), $$this->requestTime],
+      ['1 minute 1 second', 1, $this->createTimestamp('2013-12-11 10:08:07'), $$this->requestTime],
+      ['1 minute 59 seconds', 1, $this->createTimestamp('2013-12-11 10:07:09'), $$this->requestTime],
+      ['2 minutes', 60, $this->createTimestamp('2013-12-11 10:07:08'), $$this->requestTime],
+      ['2 minutes 1 second', 1, $this->createTimestamp('2013-12-11 10:07:07'), $$this->requestTime],
+      ['2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-11 10:07:06'), $$this->requestTime],
+      ['2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-11 10:07:06'), $$this->requestTime, $granularity_3],
+      ['2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-11 10:07:06'), $$this->requestTime, $granularity_4],
+      ['30 minutes', 60, $this->createTimestamp('2013-12-11 09:39:08'), $$this->requestTime],
+      ['59 minutes 59 seconds', 1, $this->createTimestamp('2013-12-11 09:09:09'), $$this->requestTime],
+      ['59 minutes 59 seconds', 1, $this->createTimestamp('2013-12-11 09:09:09'), $$this->requestTime],
 
       // Checks for hours and possibly minutes or seconds.
-      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:08'), $request_time],
-      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:08'), $request_time],
-      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:07'), $request_time],
-      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:06'), $request_time],
-      ['1 hour 1 minute', 60, $this->createTimestamp('2013-12-11 09:08:08'), $request_time],
-      ['1 hour 1 minute 1 second', 1, $this->createTimestamp('2013-12-11 09:08:07'), $request_time, $granularity_3],
-      ['1 hour 1 minute 2 seconds', 1, $this->createTimestamp('2013-12-11 09:08:06'), $request_time, $granularity_4],
-      ['1 hour 30 minutes', 60, $this->createTimestamp('2013-12-11 08:39:08'), $request_time],
-      ['2 hours', 3600, $this->createTimestamp('2013-12-11 08:09:08'), $request_time],
-      ['23 hours 59 minutes', 60, $this->createTimestamp('2013-12-10 10:10:08'), $request_time],
+      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:08'), $$this->requestTime],
+      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:08'), $$this->requestTime],
+      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:07'), $$this->requestTime],
+      ['1 hour', 3600, $this->createTimestamp('2013-12-11 09:09:06'), $$this->requestTime],
+      ['1 hour 1 minute', 60, $this->createTimestamp('2013-12-11 09:08:08'), $$this->requestTime],
+      ['1 hour 1 minute 1 second', 1, $this->createTimestamp('2013-12-11 09:08:07'), $$this->requestTime, $granularity_3],
+      ['1 hour 1 minute 2 seconds', 1, $this->createTimestamp('2013-12-11 09:08:06'), $$this->requestTime, $granularity_4],
+      ['1 hour 30 minutes', 60, $this->createTimestamp('2013-12-11 08:39:08'), $$this->requestTime],
+      ['2 hours', 3600, $this->createTimestamp('2013-12-11 08:09:08'), $$this->requestTime],
+      ['23 hours 59 minutes', 60, $this->createTimestamp('2013-12-10 10:10:08'), $$this->requestTime],
 
       // Checks for days and possibly hours, minutes or seconds.
-      ['1 day', 86400, $this->createTimestamp('2013-12-10 10:09:08'), $request_time],
-      ['1 day', 86400, $this->createTimestamp('2013-12-10 10:09:07'), $request_time],
-      ['1 day 1 hour', 3600, $this->createTimestamp('2013-12-10 09:09:08'), $request_time],
-      ['1 day 1 hour 1 minute', 60, $this->createTimestamp('2013-12-10 09:08:07'), $request_time, $granularity_3 + $langcode_en],
-      ['1 day 1 hour 1 minute 1 second', 1, $this->createTimestamp('2013-12-10 09:08:07'), $request_time, $granularity_4 + $langcode_lolspeak],
-      ['1 day 2 hours 2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-10 08:07:06'), $request_time, $granularity_4],
-      ['2 days', 86400, $this->createTimestamp('2013-12-09 10:09:08'), $request_time],
-      ['2 days', 86400, $this->createTimestamp('2013-12-09 10:07:08'), $request_time],
-      ['2 days 2 hours', 3600, $this->createTimestamp('2013-12-09 08:09:08'), $request_time],
-      ['2 days 2 hours 2 minutes', 60, $this->createTimestamp('2013-12-09 08:07:06'), $request_time, $granularity_3 + $langcode_en],
-      ['2 days 2 hours 2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-09 08:07:06'), $request_time, $granularity_4 + $langcode_lolspeak],
+      ['1 day', 86400, $this->createTimestamp('2013-12-10 10:09:08'), $$this->requestTime],
+      ['1 day', 86400, $this->createTimestamp('2013-12-10 10:09:07'), $$this->requestTime],
+      ['1 day 1 hour', 3600, $this->createTimestamp('2013-12-10 09:09:08'), $$this->requestTime],
+      ['1 day 1 hour 1 minute', 60, $this->createTimestamp('2013-12-10 09:08:07'), $$this->requestTime, $granularity_3 + $langcode_en],
+      ['1 day 1 hour 1 minute 1 second', 1, $this->createTimestamp('2013-12-10 09:08:07'), $$this->requestTime, $granularity_4 + $langcode_lolspeak],
+      ['1 day 2 hours 2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-10 08:07:06'), $$this->requestTime, $granularity_4],
+      ['2 days', 86400, $this->createTimestamp('2013-12-09 10:09:08'), $$this->requestTime],
+      ['2 days', 86400, $this->createTimestamp('2013-12-09 10:07:08'), $$this->requestTime],
+      ['2 days 2 hours', 3600, $this->createTimestamp('2013-12-09 08:09:08'), $$this->requestTime],
+      ['2 days 2 hours 2 minutes', 60, $this->createTimestamp('2013-12-09 08:07:06'), $$this->requestTime, $granularity_3 + $langcode_en],
+      ['2 days 2 hours 2 minutes 2 seconds', 1, $this->createTimestamp('2013-12-09 08:07:06'), $$this->requestTime, $granularity_4 + $langcode_lolspeak],
 
       // Checks for weeks and possibly days, hours, minutes or seconds.
-      ['1 week', 7 * 86400, $this->createTimestamp('2013-12-04 10:09:08'), $request_time],
-      ['1 week 1 day', 86400, $this->createTimestamp('2013-12-03 10:09:08'), $request_time],
-      ['2 weeks', 7 * 86400, $this->createTimestamp('2013-11-27 10:09:08'), $request_time],
-      ['2 weeks 2 days', 86400, $this->createTimestamp('2013-11-25 08:07:08'), $request_time],
-      ['2 weeks 2 days 2 hours 2 minutes', 60, $this->createTimestamp('2013-11-25 08:07:08'), $request_time, $granularity_4],
-      ['4 weeks', 7 * 86400, $this->createTimestamp('2013-11-13 10:09:08'), $request_time],
-      ['4 weeks 1 day', 86400, $this->createTimestamp('2013-11-12 10:09:08'), $request_time],
+      ['1 week', 7 * 86400, $this->createTimestamp('2013-12-04 10:09:08'), $$this->requestTime],
+      ['1 week 1 day', 86400, $this->createTimestamp('2013-12-03 10:09:08'), $$this->requestTime],
+      ['2 weeks', 7 * 86400, $this->createTimestamp('2013-11-27 10:09:08'), $$this->requestTime],
+      ['2 weeks 2 days', 86400, $this->createTimestamp('2013-11-25 08:07:08'), $$this->requestTime],
+      ['2 weeks 2 days 2 hours 2 minutes', 60, $this->createTimestamp('2013-11-25 08:07:08'), $$this->requestTime, $granularity_4],
+      ['4 weeks', 7 * 86400, $this->createTimestamp('2013-11-13 10:09:08'), $$this->requestTime],
+      ['4 weeks 1 day', 86400, $this->createTimestamp('2013-11-12 10:09:08'), $$this->requestTime],
 
       // Checks for months and possibly days, hours, minutes or seconds.
-      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 10:09:08'), $request_time],
-      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 10:09:07'), $request_time],
-      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 09:09:08'), $request_time],
-      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 09:08:07'), $request_time, $granularity_3],
-      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 09:08:07'), $request_time, $granularity_4],
-      ['1 month 4 weeks', 7 * 86400, $this->createTimestamp('2013-10-13 10:09:08'), $request_time],
-      ['1 month 4 weeks 1 day', 86400, $this->createTimestamp('2013-10-13 10:09:08'), $request_time, $granularity_3],
-      ['1 month 4 weeks', 7 * 86400, $this->createTimestamp('2013-10-12 10:09:08'), $request_time],
-      ['1 month 4 weeks 2 days', 86400, $this->createTimestamp('2013-10-12 10:09:08'), $request_time, $granularity_3],
-      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-11 10:09:08'), $request_time],
-      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-10 10:09:08'), $request_time],
-      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-09 08:07:06'), $request_time],
-      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-09 08:07:06'), $request_time, $granularity_3],
-      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-09 08:07:06'), $request_time, $granularity_4],
-      ['6 months', 30 * 86400, $this->createTimestamp('2013-06-09 10:09:08'), $request_time],
-      ['11 months', 30 * 86400, $this->createTimestamp('2013-01-11 07:09:08'), $request_time],
-      ['11 months 4 weeks', 7 * 86400, $this->createTimestamp('2012-12-12 10:09:08'), $request_time],
-      ['11 months 4 weeks 2 days', 86400, $this->createTimestamp('2012-12-12 10:09:08'), $request_time, $granularity_3],
+      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 10:09:08'), $$this->requestTime],
+      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 10:09:07'), $$this->requestTime],
+      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 09:09:08'), $$this->requestTime],
+      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 09:08:07'), $$this->requestTime, $granularity_3],
+      ['1 month', 30 * 86400, $this->createTimestamp('2013-11-11 09:08:07'), $$this->requestTime, $granularity_4],
+      ['1 month 4 weeks', 7 * 86400, $this->createTimestamp('2013-10-13 10:09:08'), $$this->requestTime],
+      ['1 month 4 weeks 1 day', 86400, $this->createTimestamp('2013-10-13 10:09:08'), $$this->requestTime, $granularity_3],
+      ['1 month 4 weeks', 7 * 86400, $this->createTimestamp('2013-10-12 10:09:08'), $$this->requestTime],
+      ['1 month 4 weeks 2 days', 86400, $this->createTimestamp('2013-10-12 10:09:08'), $$this->requestTime, $granularity_3],
+      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-11 10:09:08'), $$this->requestTime],
+      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-10 10:09:08'), $$this->requestTime],
+      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-09 08:07:06'), $$this->requestTime],
+      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-09 08:07:06'), $$this->requestTime, $granularity_3],
+      ['2 months', 30 * 86400, $this->createTimestamp('2013-10-09 08:07:06'), $$this->requestTime, $granularity_4],
+      ['6 months', 30 * 86400, $this->createTimestamp('2013-06-09 10:09:08'), $$this->requestTime],
+      ['11 months', 30 * 86400, $this->createTimestamp('2013-01-11 07:09:08'), $$this->requestTime],
+      ['11 months 4 weeks', 7 * 86400, $this->createTimestamp('2012-12-12 10:09:08'), $$this->requestTime],
+      ['11 months 4 weeks 2 days', 86400, $this->createTimestamp('2012-12-12 10:09:08'), $$this->requestTime, $granularity_3],
 
       // Checks for years and possibly months, days, hours, minutes or seconds.
-      ['1 year', 365 * 86400, $this->createTimestamp('2012-12-11 10:09:08'), $request_time],
-      ['1 year', 365 * 86400, $this->createTimestamp('2012-12-11 10:08:08'), $request_time],
-      ['1 year', 365 * 86400, $this->createTimestamp('2012-12-10 10:09:08'), $request_time],
-      ['2 years', 365 * 86400, $this->createTimestamp('2011-12-11 10:09:08'), $request_time],
-      ['2 years', 365 * 86400, $this->createTimestamp('2011-12-11 10:07:08'), $request_time],
-      ['2 years', 365 * 86400, $this->createTimestamp('2011-12-09 10:09:08'), $request_time],
-      ['2 years 2 months', 30 * 86400, $this->createTimestamp('2011-10-09 08:07:06'), $request_time, $granularity_3],
-      ['2 years 2 months', 30 * 86400, $this->createTimestamp('2011-10-09 08:07:06'), $request_time, $granularity_4],
-      ['10 years', 365 * 86400, $this->createTimestamp('2003-12-11 10:09:08'), $request_time],
-      ['100 years', 365 * 86400, $this->createTimestamp('1913-12-11 10:09:08'), $request_time],
+      ['1 year', 365 * 86400, $this->createTimestamp('2012-12-11 10:09:08'), $$this->requestTime],
+      ['1 year', 365 * 86400, $this->createTimestamp('2012-12-11 10:08:08'), $$this->requestTime],
+      ['1 year', 365 * 86400, $this->createTimestamp('2012-12-10 10:09:08'), $$this->requestTime],
+      ['2 years', 365 * 86400, $this->createTimestamp('2011-12-11 10:09:08'), $$this->requestTime],
+      ['2 years', 365 * 86400, $this->createTimestamp('2011-12-11 10:07:08'), $$this->requestTime],
+      ['2 years', 365 * 86400, $this->createTimestamp('2011-12-09 10:09:08'), $$this->requestTime],
+      ['2 years 2 months', 30 * 86400, $this->createTimestamp('2011-10-09 08:07:06'), $$this->requestTime, $granularity_3],
+      ['2 years 2 months', 30 * 86400, $this->createTimestamp('2011-10-09 08:07:06'), $$this->requestTime, $granularity_4],
+      ['10 years', 365 * 86400, $this->createTimestamp('2003-12-11 10:09:08'), $$this->requestTime],
+      ['100 years', 365 * 86400, $this->createTimestamp('1913-12-11 10:09:08'), $$this->requestTime],
 
       // Checks the non-strict option vs. strict (default).
       ['1 second', 1, $this->createTimestamp('2013-12-11 10:09:08'), $this->createTimestamp('2013-12-11 10:09:07'), $non_strict],
       ['0 seconds', 0, $this->createTimestamp('2013-12-11 10:09:08'), $this->createTimestamp('2013-12-11 10:09:07')],
 
       // Checks granularity limit.
-      ['2 years 3 months 1 week', 7 * 86400, $this->createTimestamp('2011-08-30 11:15:57'), $request_time, $granularity_3],
+      ['2 years 3 months 1 week', 7 * 86400, $this->createTimestamp('2011-08-30 11:15:57'), $$this->requestTime, $granularity_3],
     ];
 
     return $data;
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
index ac69590e8b..080a5dc423 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
@@ -875,7 +875,7 @@ public function testRenderCacheMaxAge($max_age, $is_render_cached, $render_cache
   public function providerTestRenderCacheMaxAge() {
     return [
       [0, FALSE, NULL],
-      [60, TRUE, (int) $_SERVER['REQUEST_TIME'] + 60],
+      [60, TRUE, (int) $_SERVER['$this->requestTime'] + 60],
       [Cache::PERMANENT, TRUE, -1],
     ];
   }
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
index d667d1ddc8..9c6a0d2a7c 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
@@ -140,7 +140,7 @@ protected function setUp() {
       });
     $this->requestStack = new RequestStack();
     $request = new Request();
-    $request->server->set('REQUEST_TIME', $_SERVER['REQUEST_TIME']);
+    $request->server->set('$this->requestTime', $_SERVER['$this->requestTime']);
     $this->requestStack->push($request);
     $this->cacheFactory = $this->createMock('Drupal\Core\Cache\CacheFactoryInterface');
     $this->cacheContextsManager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
@@ -231,7 +231,7 @@ protected function setupMemoryCache() {
   protected function setUpRequest($method = 'GET') {
     $request = Request::create('/', $method);
     // Ensure that the request time is set as expected.
-    $request->server->set('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
+    $request->server->set('$this->requestTime', (int) $_SERVER['$this->requestTime']);
     $this->requestStack->push($request);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
index 3586877c35..9a12e2cbce 100644
--- a/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
@@ -86,7 +86,7 @@ protected function setUp(): void {
     $this->ownObject = (object) [
       'data' => 'test_data',
       'owner' => $this->currentUser->id(),
-      'updated' => (int) $request->server->get('REQUEST_TIME'),
+      'updated' => (int) $request->server->get('$this->requestTime'),
     ];
 
     // Clone the object but change the owner.
diff --git a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
index 97be1742bc..0fe4e8bc04 100644
--- a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
@@ -90,7 +90,7 @@ protected function setUp(): void {
     $this->ownObject = (object) [
       'data' => 'test_data',
       'owner' => $this->owner,
-      'updated' => (int) $request->server->get('REQUEST_TIME'),
+      'updated' => (int) $request->server->get('$this->requestTime'),
     ];
 
     // Clone the object but change the owner.
