diff --git a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
index 350fa5199b07507734c7dc8fe03f666c2d82638d..5510aa4aeec6064800880f1e48e0c5f9fb9d0cfc 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
@@ -67,9 +67,6 @@ protected function setUp() {
       return FALSE;
     }
 
-    // Set user agent to be consistent with WebTestBase.
-    $_SERVER['HTTP_USER_AGENT'] = $this->databasePrefix;
-
     $this->setup = TRUE;
   }
 }