Skip to content
Snippets Groups Projects

Issue #3276645: Run readiness checks after stored results have been cleared in certain situations

Merged Issue #3276645: Run readiness checks after stored results have been cleared in certain situations
2 files
+ 37
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -215,10 +215,28 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$this->assertNotSame($pre_apply_time, $post_apply_time);
}
/**
* Data provider for testStatusCheckerRunAfterUpdate().
*
* @return bool[][]
* The test cases.
*/
public function providerStatusCheckerRunAfterUpdate(): array {
return [
'has database updates' => [TRUE],
'does not have database updates' => [FALSE],
];
}
/**
* Tests status checks are run after an update.
*
* @param bool $has_database_updates
* Whether the site has database updates or not.
*
* @dataProvider providerStatusCheckerRunAfterUpdate
*/
public function testStatusCheckerRunAfterUpdate(): void {
public function testStatusCheckerRunAfterUpdate(bool $has_database_updates): void {
$this->useFixtureDirectoryAsStaged(__DIR__ . '/../../fixtures/stage_composer/semver_test');
$this->setReleaseMetadata(__DIR__ . '/../../fixtures/release-history/semver_test.1.1.xml');
$this->setProjectInstalledVersion(['semver_test' => '8.1.0']);
@@ -229,6 +247,9 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$assert_session = $this->assertSession();
$assert_session->pageTextNotContains(static::$errorsExplanation);
$assert_session->pageTextNotContains(static::$warningsExplanation);
if ($has_database_updates) {
StagedDatabaseUpdateValidator::setExtensionsWithUpdates(['system', 'semver_test']);
}
$this->assertTableShowsUpdates('Semver Test', '8.1.0', '8.1.1');
$this->assertUpdatesCount(1);
Loading