diff --git a/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php b/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php index fcd14e0bfcbffc30983b0f441e0df113faea9bd0..208095f9bc9dc40576a3470ed572d984edb6f173 100644 --- a/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php +++ b/automatic_updates_extensions/tests/src/Kernel/AutomaticUpdatesExtensionsKernelTestBase.php @@ -28,6 +28,19 @@ abstract class AutomaticUpdatesExtensionsKernelTestBase extends AutomaticUpdates 'automatic_updates_test_release_history', ]; + /** + * {@inheritdoc} + */ + protected function setUp(): void { + // Disable the Composer executable validator, since it may cause the tests + // to fail if a supported version of Composer is unavailable to the web + // server. This should be okay in most situations because, apart from the + // validator, only Composer Stager needs run Composer, and + // package_manager_bypass is disabling those operations. + $this->disableValidators[] = 'package_manager.validator.composer_executable'; + parent::setUp(); + } + /** * {@inheritdoc} */ diff --git a/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php b/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php index ab79f254917cee647f818f0913fc98948c06a866..35706c57eee13fe445e4d4882adf602f1c923946 100644 --- a/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php +++ b/automatic_updates_extensions/tests/src/Kernel/Validator/UpdateReleaseValidatorTest.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\Tests\automatic_updates_extensions\Kernel\Valdiator; +namespace Drupal\Tests\automatic_updates_extensions\Kernel\Validator; use Drupal\automatic_updates\LegacyVersionUtility; use Drupal\package_manager\Event\PreCreateEvent; @@ -20,6 +20,7 @@ class UpdateReleaseValidatorTest extends AutomaticUpdatesExtensionsKernelTestBas protected function setUp(): void { $this->disableValidators[] = 'automatic_updates_extensions.validator.packages_installed_with_composer'; parent::setUp(); + $this->createTestProject(); } /** @@ -58,7 +59,7 @@ class UpdateReleaseValidatorTest extends AutomaticUpdatesExtensionsKernelTestBas $expected_results = []; } - $this->assertUpdaterResults([$project => $target_version], $expected_results, PreCreateEvent::class); + $this->assertUpdateResults([$project => $target_version], $expected_results, PreCreateEvent::class); } /**