Skip to content
Snippets Groups Projects

Issue #3321684: Should most validators that subscribe to PreCreate check readiness to update also subscribe to PreApply?

Merged Issue #3321684: Should most validators that subscribe to PreCreate check readiness to update also subscribe to PreApply?
1 file
+ 16
14
Compare changes
  • Side-by-side
  • Inline
@@ -39,6 +39,8 @@ class CronServerValidatorTest extends AutomaticUpdatesKernelTestBase {
$error = ValidationResult::createError([
'Your site appears to be running on the built-in PHP web server on port 80. Drupal cannot be automatically updated with this configuration unless the site can also be reached on an alternate port.',
]);
// Add all the test cases where there no expected results for all cron
// modes.
foreach ([CronUpdater::DISABLED, CronUpdater::SECURITY, CronUpdater::ALL] as $cron_mode) {
$test_cases["PHP server with alternate port, cron $cron_mode"] = [
TRUE,
@@ -46,7 +48,21 @@ class CronServerValidatorTest extends AutomaticUpdatesKernelTestBase {
$cron_mode,
[],
];
$test_cases[" 'other server with alternate port, cron $cron_mode"] = [
TRUE,
'nginx',
$cron_mode,
[],
];
$test_cases["other server with same port, cron $cron_mode"] = [
FALSE,
'nginx',
$cron_mode,
[],
];
}
// If the PHP server is used with the same port and cron is enabled an error
// will be flagged.
foreach ([CronUpdater::SECURITY, CronUpdater::ALL] as $cron_mode) {
$test_cases["PHP server with same port, cron $cron_mode"] = [
FALSE,
@@ -61,20 +77,6 @@ class CronServerValidatorTest extends AutomaticUpdatesKernelTestBase {
CronUpdater::DISABLED,
[],
];
foreach ([CronUpdater::DISABLED, CronUpdater::SECURITY, CronUpdater::ALL] as $cron_mode) {
$test_cases[" 'other server with alternate port, cron $cron_mode"] = [
TRUE,
'nginx',
$cron_mode,
[],
];
$test_cases["other server with same port, cron $cron_mode"] = [
FALSE,
'nginx',
$cron_mode,
[],
];
}
return $test_cases;
}
Loading