diff --git a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
index c4c7a1db5d3cea6705e927e4ef530eb13abc521a..be1fb136edaf051fb9ccf147c9334f1dd7e35b36 100644
--- a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
+++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php
@@ -127,7 +127,7 @@ public function testSendPersonalContactMessage(): void {
     // Assert mail content.
     $this->assertMailString('body', 'Hello ' . $this->contactUser->getDisplayName(), 1);
     $this->assertMailString('body', $this->webUser->getDisplayName(), 1);
-    $this->assertMailString('body', Html::Escape($message['message[0][value]']), 1);
+    $this->assertMailString('body', Html::escape($message['message[0][value]']), 1);
   }
 
   /**
diff --git a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
index bd6efb306d3f08e54e90bc9d885aaf332796ce0c..22f8f7f57d1b854c34c32eafb0d2351131af21f0 100644
--- a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
@@ -874,9 +874,9 @@ protected function setUpAuthorization($method): void {
    * @internal
    */
   protected function assertResponseData(array $expected, ResponseInterface $response): void {
-    static::recursiveKSort($expected);
+    static::recursiveKsort($expected);
     $actual = $this->getDocumentFromResponse($response);
-    static::recursiveKSort($actual);
+    static::recursiveKsort($actual);
 
     $this->assertSame($expected, $actual);
   }
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
index b6051420b4c0c3df86836907584c584a98315024..fe70fda8b5727d04b5debffb45ffd3384fbddc99 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
@@ -753,7 +753,7 @@ public function testEntityConstraintValidation(): void {
       ->setLabel('Test entity')
       ->setSetting('target_type', 'node')
       ->setSetting('handler_settings', ['target_bundles' => ['article' => 'article']]);
-    $reference_field = \Drupal::TypedDataManager()->create($definition);
+    $reference_field = \Drupal::typedDataManager()->create($definition);
     $reference_field->appendItem(['entity' => $node]);
     $violations = $reference_field->validate();
     $this->assertEquals(1, $violations->count());
diff --git a/core/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php
index 1e1064dcdf2937e1374fcc2b7669b4b222070492..55cfacd1a91ecca8ca79aeebb4418ec2ec065a29 100644
--- a/core/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Checkpoint/CheckpointStorageTest.php
@@ -192,12 +192,12 @@ public static function writeMethodsProvider(): array {
 
     $data = [];
     $data[] = ['write', ['config.a', (array) Random::getGenerator()->object()], $fixture];
-    $data[] = ['write', [Random::MachineName(), (array) Random::getGenerator()->object()], $fixture];
+    $data[] = ['write', [Random::machineName(), (array) Random::getGenerator()->object()], $fixture];
     $data[] = ['delete', ['config.a'], $fixture];
-    $data[] = ['delete', [Random::MachineName()], $fixture];
+    $data[] = ['delete', [Random::machineName()], $fixture];
     $data[] = ['rename', ['config.a', 'config.b'], $fixture];
-    $data[] = ['rename', ['config.a', Random::MachineName()], $fixture];
-    $data[] = ['rename', [Random::MachineName(), Random::MachineName()], $fixture];
+    $data[] = ['rename', ['config.a', Random::machineName()], $fixture];
+    $data[] = ['rename', [Random::machineName(), Random::machineName()], $fixture];
     $data[] = ['deleteAll', [''], $fixture];
     $data[] = ['deleteAll', ['config'], $fixture];
     $data[] = ['deleteAll', ['other'], $fixture];
diff --git a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php
index 13342b0112c58b8613b3ce7a74f18fb3f842f400..6868b859b59329a5c59dc8f729b15d3f36b951bf 100644
--- a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php
@@ -125,12 +125,12 @@ public static function writeMethodsProvider() {
 
     $data = [];
     $data[] = ['write', ['config.a', (array) Random::getGenerator()->object()], $fixture];
-    $data[] = ['write', [Random::MachineName(), (array) Random::getGenerator()->object()], $fixture];
+    $data[] = ['write', [Random::machineName(), (array) Random::getGenerator()->object()], $fixture];
     $data[] = ['delete', ['config.a'], $fixture];
-    $data[] = ['delete', [Random::MachineName()], $fixture];
+    $data[] = ['delete', [Random::machineName()], $fixture];
     $data[] = ['rename', ['config.a', 'config.b'], $fixture];
-    $data[] = ['rename', ['config.a', Random::MachineName()], $fixture];
-    $data[] = ['rename', [Random::MachineName(), Random::MachineName()], $fixture];
+    $data[] = ['rename', ['config.a', Random::machineName()], $fixture];
+    $data[] = ['rename', [Random::machineName(), Random::machineName()], $fixture];
     $data[] = ['deleteAll', [''], $fixture];
     $data[] = ['deleteAll', ['config'], $fixture];
     $data[] = ['deleteAll', ['other'], $fixture];
diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
index 68e5633bf148827654b1cfa51257135a82e5efff..e25d265521c2810c87ce67ef81aa2a75beb9c37a 100644
--- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php
@@ -338,7 +338,7 @@ protected function setupSiteTokens(): void {
     // The site name is plain text, but the slogan is markup.
     $tokens = [
       '[site:name]' => 'Your <best> buys',
-      '[site:slogan]' => Markup::Create('We are <b>best</b>'),
+      '[site:slogan]' => Markup::create('We are <b>best</b>'),
     ];
 
     $this->moduleHandler->expects($this->any())