From 33b8a64e2d21d46866d9592c63d07e4a75400aff Mon Sep 17 00:00:00 2001
From: omkar podey <58183-omkar.podey@users.noreply.drupalcode.org>
Date: Tue, 14 Mar 2023 11:47:06 +0000
Subject: [PATCH] Issue #3346547 by omkar.podey: Rename test module
 aaa_automatic_updates_test to aaa_package_manager_test

---
 ...tomaticUpdatesExtensionsKernelTestBase.php |  2 +-
 ...xml => aaa_package_manager_test.7.0.1.xml} | 44 +++++++++----------
 .../aaa_package_manager_test.info.yml}        |  0
 .../tests/src/Kernel/ProjectInfoTest.php      | 16 +++----
 .../Kernel/SupportedReleaseValidatorTest.php  | 14 +++---
 5 files changed, 38 insertions(+), 38 deletions(-)
 rename package_manager/tests/fixtures/release-history/{aaa_automatic_updates_test.7.0.1.xml => aaa_package_manager_test.7.0.1.xml} (67%)
 rename package_manager/tests/modules/{aaa_automatic_updates_test/aaa_automatic_updates_test.info.yml => aaa_package_manager_test/aaa_package_manager_test.info.yml} (100%)

diff --git a/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php b/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php
index 59777867a8..dfdb9359d8 100644
--- a/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php
+++ b/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php
@@ -63,7 +63,7 @@ abstract class AutomaticUpdatesExtensionsKernelTestBase extends AutomaticUpdates
         "type" => "drupal-module",
       ])
       ->addPackage([
-        "name" => "drupal/aaa_automatic_updates_test",
+        "name" => "drupal/aaa_package_manager_test",
         "version" => "1.0.0",
         "type" => "drupal-module",
       ])->commitChanges();
diff --git a/package_manager/tests/fixtures/release-history/aaa_automatic_updates_test.7.0.1.xml b/package_manager/tests/fixtures/release-history/aaa_package_manager_test.7.0.1.xml
similarity index 67%
rename from package_manager/tests/fixtures/release-history/aaa_automatic_updates_test.7.0.1.xml
rename to package_manager/tests/fixtures/release-history/aaa_package_manager_test.7.0.1.xml
index 678adce6f8..fdd4605014 100644
--- a/package_manager/tests/fixtures/release-history/aaa_automatic_updates_test.7.0.1.xml
+++ b/package_manager/tests/fixtures/release-history/aaa_package_manager_test.7.0.1.xml
@@ -4,7 +4,7 @@ This fixture is used by:
 - \Drupal\Tests\package_manager\Kernel\SupportedReleaseValidatorTest
 - \Drupal\Tests\package_manager\Kernel\ProjectInfoTest
 
-Contains metadata about the following (fake) releases of aaa_automatic_updates_test module, all of which are secure, in order:
+Contains metadata about the following (fake) releases of aaa_package_manager_test module, all of which are secure, in order:
 - 7.0.1
 - 7.0.0
 - 7.0.0-alpha1
@@ -18,11 +18,11 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
 -->
 <project xmlns:dc="http://purl.org/dc/elements/1.1/">
 <title>AAA</title>
-<short_name>aaa_automatic_updates_test</short_name>
+<short_name>aaa_package_manager_test</short_name>
 <dc:creator>AAA</dc:creator>
 <supported_branches>7.0.,8.x-6.</supported_branches>
 <project_status>published</project_status>
-<link>http://example.com/project/aaa_automatic_updates_test</link>
+<link>http://example.com/project/aaa_package_manager_test</link>
   <terms>
    <term><name>Projects</name><value>AAA project</value></term>
   </terms>
@@ -31,8 +31,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
         <name>AAA 7.0.1</name>
         <version>7.0.1</version>
         <status>published</status>
-        <release_link>http://example.com/aaa_automatic_updates_test-9-7-1-release</release_link>
-        <download_link>http://example.com/aaa_automatic_updates_test-9-7-1.tar.gz</download_link>
+        <release_link>http://example.com/aaa_package_manager_test-9-7-1-release</release_link>
+        <download_link>http://example.com/aaa_package_manager_test-9-7-1.tar.gz</download_link>
         <date>1250425521</date>
         <terms>
             <term><name>Release type</name><value>New features</value></term>
@@ -43,8 +43,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
         <name>AAA 7.0.0</name>
         <version>7.0.0</version>
         <status>published</status>
-        <release_link>http://example.com/aaa_automatic_updates_test-9-7-0-release</release_link>
-        <download_link>http://example.com/aaa_automatic_updates_test-9-7-0.tar.gz</download_link>
+        <release_link>http://example.com/aaa_package_manager_test-9-7-0-release</release_link>
+        <download_link>http://example.com/aaa_package_manager_test-9-7-0.tar.gz</download_link>
         <date>1250424521</date>
         <terms>
             <term><name>Release type</name><value>New features</value></term>
@@ -55,8 +55,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
         <name>AAA 7.0.0-alpha1</name>
         <version>7.0.0-alpha1</version>
         <status>published</status>
-        <release_link>http://example.com/aaa_automatic_updates_test-9-7-0-alpha1-release</release_link>
-        <download_link>http://example.com/aaa_automatic_updates_test-9-7-0-alpha1.tar.gz</download_link>
+        <release_link>http://example.com/aaa_package_manager_test-9-7-0-alpha1-release</release_link>
+        <download_link>http://example.com/aaa_package_manager_test-9-7-0-alpha1.tar.gz</download_link>
         <date>1250424521</date>
         <terms>
             <term><name>Release type</name><value>New features</value></term>
@@ -67,8 +67,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
     <name>AAA 8.x-6.2</name>
     <version>8.x-6.2</version>
     <status>published</status>
-    <release_link>http://example.com/aaa_automatic_updates_test-9-8-2-release</release_link>
-    <download_link>http://example.com/aaa_automatic_updates_test-9-8-2.tar.gz</download_link>
+    <release_link>http://example.com/aaa_package_manager_test-9-8-2-release</release_link>
+    <download_link>http://example.com/aaa_package_manager_test-9-8-2.tar.gz</download_link>
     <date>1250425521</date>
     <terms>
       <term><name>Release type</name><value>New features</value></term>
@@ -79,8 +79,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
   <name>AAA 8.x-6.1</name>
   <version>8.x-6.1</version>
   <status>published</status>
-  <release_link>http://example.com/aaa_automatic_updates_test-9-8-1-release</release_link>
-  <download_link>http://example.com/aaa_automatic_updates_test-9-8-1.tar.gz</download_link>
+  <release_link>http://example.com/aaa_package_manager_test-9-8-1-release</release_link>
+  <download_link>http://example.com/aaa_package_manager_test-9-8-1.tar.gz</download_link>
   <date>1250425521</date>
   <terms>
     <term><name>Release type</name><value>New features</value></term>
@@ -91,8 +91,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
    <name>AAA 8.x-6.0</name>
    <version>8.x-6.0</version>
    <status>published</status>
-   <release_link>http://example.com/aaa_automatic_updates_test-9-8-0-release</release_link>
-   <download_link>http://example.com/aaa_automatic_updates_test-9-8-0.tar.gz</download_link>
+   <release_link>http://example.com/aaa_package_manager_test-9-8-0-release</release_link>
+   <download_link>http://example.com/aaa_package_manager_test-9-8-0.tar.gz</download_link>
    <date>1250424521</date>
    <terms>
      <term><name>Release type</name><value>New features</value></term>
@@ -103,8 +103,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
     <name>AAA 8.x-6.0-alpha1</name>
     <version>8.x-6.0-alpha1</version>
     <status>published</status>
-    <release_link>http://example.com/aaa_automatic_updates_test-9-8-0-alpha1-release</release_link>
-    <download_link>http://example.com/aaa_automatic_updates_test-9-8-0-alpha1.tar.gz</download_link>
+    <release_link>http://example.com/aaa_package_manager_test-9-8-0-alpha1-release</release_link>
+    <download_link>http://example.com/aaa_package_manager_test-9-8-0-alpha1.tar.gz</download_link>
     <date>1250424521</date>
     <terms>
       <term><name>Release type</name><value>New features</value></term>
@@ -115,8 +115,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
         <name>AAA 7.0.0-dev</name>
         <version>7.0.x-dev</version>
         <status>published</status>
-        <release_link>http://example.com/aaa_automatic_updates_test-9-7-0-dev-release</release_link>
-        <download_link>http://example.com/aaa_automatic_updates_test-9-7-0-dev.tar.gz</download_link>
+        <release_link>http://example.com/aaa_package_manager_test-9-7-0-dev-release</release_link>
+        <download_link>http://example.com/aaa_package_manager_test-9-7-0-dev.tar.gz</download_link>
         <date>1250424521</date>
         <terms>
             <term><name>Release type</name><value>New features</value></term>
@@ -127,8 +127,8 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
         <name>AAA 8.x-6.x-dev</name>
         <version>8.x-6.x-dev</version>
         <status>published</status>
-        <release_link>http://example.com/aaa_automatic_updates_test-9-8-0-dev-release</release_link>
-        <download_link>http://example.com/aaa_automatic_updates_test-9-8-0-dev.tar.gz</download_link>
+        <release_link>http://example.com/aaa_package_manager_test-9-8-0-dev-release</release_link>
+        <download_link>http://example.com/aaa_package_manager_test-9-8-0-dev.tar.gz</download_link>
         <date>1250424521</date>
         <terms>
             <term><name>Release type</name><value>New features</value></term>
@@ -139,7 +139,7 @@ Contains metadata about the following (fake) releases of aaa_automatic_updates_t
         <name>AAA 8.x-5.x</name>
         <version>8.x-5.x</version>
         <status>published</status>
-        <release_link>http://example.com/aaa_automatic_updates_test-9-5-0-dev-release</release_link>
+        <release_link>http://example.com/aaa_package_manager_test-9-5-0-dev-release</release_link>
         <download_link/>
         <date/>
         <filesize/>
diff --git a/package_manager/tests/modules/aaa_automatic_updates_test/aaa_automatic_updates_test.info.yml b/package_manager/tests/modules/aaa_package_manager_test/aaa_package_manager_test.info.yml
similarity index 100%
rename from package_manager/tests/modules/aaa_automatic_updates_test/aaa_automatic_updates_test.info.yml
rename to package_manager/tests/modules/aaa_package_manager_test/aaa_package_manager_test.info.yml
diff --git a/package_manager/tests/src/Kernel/ProjectInfoTest.php b/package_manager/tests/src/Kernel/ProjectInfoTest.php
index e894eb8f57..5abd155007 100644
--- a/package_manager/tests/src/Kernel/ProjectInfoTest.php
+++ b/package_manager/tests/src/Kernel/ProjectInfoTest.php
@@ -35,10 +35,10 @@ class ProjectInfoTest extends PackageManagerKernelTestBase {
     }
     else {
       // Update the version and the project of the project.
-      $this->enableModules(['aaa_automatic_updates_test']);
+      $this->enableModules(['aaa_package_manager_test']);
       $extension_info_update = [
         'version' => $installed_version,
-        'project' => 'aaa_automatic_updates_test',
+        'project' => 'aaa_package_manager_test',
       ];
       $this->config('update_test.settings')
         ->set("system_info.$project", $extension_info_update)
@@ -104,22 +104,22 @@ class ProjectInfoTest extends PackageManagerKernelTestBase {
         ['9.8.2', '9.8.1', '9.8.1-beta1', '9.8.0-alpha1', '9.7.1'],
       ],
       'contrib, semver and legacy' => [
-        'aaa_automatic_updates_test.7.0.1.xml',
+        'aaa_package_manager_test.7.0.1.xml',
         '8.x-6.0-alpha1',
         ['7.0.1', '7.0.0', '7.0.0-alpha1', '8.x-6.2', '8.x-6.1', '8.x-6.0'],
       ],
       'contrib, semver and legacy, some lower' => [
-        'aaa_automatic_updates_test.7.0.1.xml',
+        'aaa_package_manager_test.7.0.1.xml',
         '8.x-6.1',
         ['7.0.1', '7.0.0', '7.0.0-alpha1', '8.x-6.2'],
       ],
       'contrib, semver and legacy, on semantic dev' => [
-        'aaa_automatic_updates_test.7.0.1.xml',
+        'aaa_package_manager_test.7.0.1.xml',
         '7.0.x-dev',
         ['7.0.1', '7.0.0', '7.0.0-alpha1'],
       ],
       'contrib, semver and legacy, on legacy dev' => [
-        'aaa_automatic_updates_test.7.0.1.xml',
+        'aaa_package_manager_test.7.0.1.xml',
         '8.x-6.x-dev',
         ['7.0.1', '7.0.0', '7.0.0-alpha1', '8.x-6.2', '8.x-6.1', '8.x-6.0', '8.x-6.0-alpha1'],
       ],
@@ -136,7 +136,7 @@ class ProjectInfoTest extends PackageManagerKernelTestBase {
       ->addLogger($logger);
     $fixtures_directory = __DIR__ . '/../../fixtures/release-history/';
     $metadata_fixtures['drupal'] = $fixtures_directory . 'drupal.9.8.2.xml';
-    $metadata_fixtures['aaa_automatic_updates_test'] = $fixtures_directory . 'aaa_automatic_updates_test.7.0.1.xml';
+    $metadata_fixtures['aaa_package_manager_test'] = $fixtures_directory . 'aaa_package_manager_test.7.0.1.xml';
     $this->setReleaseMetadata($metadata_fixtures);
     $available = update_get_available(TRUE);
     $this->assertSame(['drupal'], array_keys($available));
@@ -145,7 +145,7 @@ class ProjectInfoTest extends PackageManagerKernelTestBase {
     // Set the state that the update module uses to store last checked time
     // ensure our calls do not affect it.
     $state->set('update.last_check', 123);
-    $project_info = new ProjectInfo('aaa_automatic_updates_test');
+    $project_info = new ProjectInfo('aaa_package_manager_test');
     $project_data = $project_info->getProjectInfo();
     // Ensure the project information is correct.
     $this->assertSame('AAA', $project_data['title']);
diff --git a/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php b/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php
index 8e076e5354..754234ad3a 100644
--- a/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php
+++ b/package_manager/tests/src/Kernel/SupportedReleaseValidatorTest.php
@@ -114,27 +114,27 @@ class SupportedReleaseValidatorTest extends PackageManagerKernelTestBase {
           ValidationResult::createError([t('aaa_update_test (drupal/aaa_update_test) 3.0.0')], $summary),
         ],
       ],
-      'aaa_automatic_updates_test(not in active), update to unsupported branch' => [
+      'aaa_package_manager_test(not in active), update to unsupported branch' => [
         [
-          'aaa_automatic_updates_test' => "$release_fixture_folder/aaa_automatic_updates_test.7.0.1.xml",
+          'aaa_package_manager_test' => "$release_fixture_folder/aaa_package_manager_test.7.0.1.xml",
         ],
         FALSE,
         [
-          'name' => "drupal/aaa_automatic_updates_test",
+          'name' => "drupal/aaa_package_manager_test",
           'version' => '7.0.1-dev',
           'type' => 'drupal-module',
         ],
         [
-          ValidationResult::createError([t('aaa_automatic_updates_test (drupal/aaa_automatic_updates_test) 7.0.1-dev')], $summary),
+          ValidationResult::createError([t('aaa_package_manager_test (drupal/aaa_package_manager_test) 7.0.1-dev')], $summary),
         ],
       ],
-      'aaa_automatic_updates_test(not in active), update to supported branch' => [
+      'aaa_package_manager_test(not in active), update to supported branch' => [
         [
-          'aaa_automatic_updates_test' => "$release_fixture_folder/aaa_automatic_updates_test.7.0.1.xml",
+          'aaa_package_manager_test' => "$release_fixture_folder/aaa_package_manager_test.7.0.1.xml",
         ],
         FALSE,
         [
-          'name' => "drupal/aaa_automatic_updates_test",
+          'name' => "drupal/aaa_package_manager_test",
           'version' => '7.0.1',
           'type' => 'drupal-module',
         ],
-- 
GitLab