diff --git a/core/modules/system/tests/modules/unversioned_assets_test/src/Hook/UnversionedAssetsTestHooks.php b/core/modules/system/tests/modules/unversioned_assets_test/src/Hook/UnversionedAssetsTestHooks.php
new file mode 100644
index 0000000000000000000000000000000000000000..7bc2237f694ca89f98250252956219ab6c2a68b9
--- /dev/null
+++ b/core/modules/system/tests/modules/unversioned_assets_test/src/Hook/UnversionedAssetsTestHooks.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Drupal\unversioned_assets_test\Hook;
+
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for unversioned_assets_test.
+ */
+class UnversionedAssetsTestHooks {
+
+  /**
+   * Implements hook_library_info_alter().
+   */
+  #[Hook('library_info_alter')]
+  public function libraryInfoAlter(&$libraries, $extension): void {
+    if ($extension === 'system') {
+      // Remove the version and provide an additional CSS file we can alter the
+      // contents of .
+      unset($libraries['base']['version']);
+      $libraries['base']['css']['component']['public://test.css'] = ['weight' => -10];
+    }
+  }
+
+}
diff --git a/core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module b/core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module
deleted file mode 100644
index 89d46002e97e3b608efe318c258b4c9bef032de1..0000000000000000000000000000000000000000
--- a/core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * @file
- * Helper module for unversioned asset test.
- */
-
-declare(strict_types=1);
-
-/**
- * Implements hook_library_info_build().
- */
-function unversioned_assets_test_library_info_alter(&$libraries, $extension): void {
-  if ($extension === 'system') {
-    // Remove the version and provide an additional CSS file we can alter the
-    // contents of .
-    unset($libraries['base']['version']);
-    $libraries['base']['css']['component']['public://test.css'] = ['weight' => -10];
-  }
-}