diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php
index e9d912e42240ab6c2b8c3643607a1e926132a432..f88dc2ba1a60f301323ea1f3a492dbcedec514a2 100644
--- a/core/.phpstan-baseline.php
+++ b/core/.phpstan-baseline.php
@@ -16714,12 +16714,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function content_translation_test_form_node_form_submit\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Method Drupal\\\\content_translation_test\\\\Hook\\\\ContentTranslationTestHooks\\:\\:entityAccess\\(\\) has no return type specified\\.$#',
diff --git a/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module b/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module
deleted file mode 100644
index 2e37fcf54a7163690768227332f1f176e6153db7..0000000000000000000000000000000000000000
--- a/core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * @file
- * Helper module for the Content Translation tests.
- */
-
-declare(strict_types=1);
-
-use Drupal\Core\Form\FormStateInterface;
-
-/**
- * Form submission handler for custom field added based on a request parameter.
- *
- * @see content_translation_test_form_node_article_form_alter()
- */
-function content_translation_test_form_node_form_submit($form, FormStateInterface $form_state) {
-  \Drupal::state()->set('test_field_only_en_fr', $form_state->getValue('test_field_only_en_fr'));
-}
diff --git a/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php b/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php
index 6c5856fad4513ea416d88ee8121b88a6822c5fab..a7e03f04ad7a33fb8d201b7ed6575fead051ef09 100644
--- a/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php
+++ b/core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php
@@ -61,7 +61,7 @@ public function formNodeFormAlter(&$form, FormStateInterface $form_state, $form_
       ];
       foreach (array_keys($form['actions']) as $action) {
         if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') {
-          $form['actions'][$action]['#submit'][] = 'content_translation_test_form_node_form_submit';
+          $form['actions'][$action]['#submit'][] = [$this, 'formNodeFormSubmit'];
         }
       }
     }
@@ -75,4 +75,13 @@ public function entityTranslationDelete(EntityInterface $translation) {
     \Drupal::state()->set('content_translation_test.translation_deleted', TRUE);
   }
 
+  /**
+   * Form submission handler for custom field added based on a request parameter.
+   *
+   * @see content_translation_test_form_node_article_form_alter()
+   */
+  public function formNodeFormSubmit($form, FormStateInterface $form_state): void {
+    \Drupal::state()->set('test_field_only_en_fr', $form_state->getValue('test_field_only_en_fr'));
+  }
+
 }