From 45e03ba9457788885f8b87a108dc664547805801 Mon Sep 17 00:00:00 2001 From: nod_ <nod_@598310.no-reply.drupal.org> Date: Tue, 27 Aug 2024 11:30:05 +0200 Subject: [PATCH] Issue #3469583 by catch, pooja_sharma: Speed up UpdateSemverTestSecurityCoverageTest (cherry picked from commit 04fcdb47585eea363fb7bb634397ed6527b6fc17) --- .../UpdateSemverCoreSecurityCoverageTest.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php index 971e2b161afe..59af11165d75 100644 --- a/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php +++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php @@ -8,10 +8,18 @@ * Tests the security coverage messages for Drupal core versions. * * @group update - * @group #slow */ class UpdateSemverCoreSecurityCoverageTest extends UpdateSemverCoreTestBase { + /** + * Tests the security coverage messages for Drupal core versions. + */ + public function testSecurityCoverageMessage(): void { + foreach (static::securityCoverageMessageProvider() as $case) { + $this->doTestSecurityCoverageMessage($case['installed_version'], $case['fixture'], $case['requirements_section_heading'], $case['message'], $case['mock_date']); + } + } + /** * Tests the security coverage messages for Drupal core versions. * @@ -26,10 +34,8 @@ class UpdateSemverCoreSecurityCoverageTest extends UpdateSemverCoreTestBase { * @param string $mock_date * The mock date to use if needed in the format CCYY-MM-DD. If an empty * string is provided, no mock date will be used. - * - * @dataProvider securityCoverageMessageProvider */ - public function testSecurityCoverageMessage($installed_version, $fixture, $requirements_section_heading, $message, $mock_date): void { + protected function doTestSecurityCoverageMessage($installed_version, $fixture, $requirements_section_heading, $message, $mock_date): void { \Drupal::state()->set('update_test.mock_date', $mock_date); $this->setProjectInstalledVersion($installed_version); $this->refreshUpdateStatus(['drupal' => $fixture]); @@ -76,7 +82,7 @@ public function testSecurityCoverageMessage($installed_version, $fixture, $requi * - 10.4.0 * - 10.5.0 */ - public static function securityCoverageMessageProvider() { + protected static function securityCoverageMessageProvider() { $release_coverage_message = 'Visit the release cycle overview for more information on supported releases.'; $coverage_ended_message = 'Coverage has ended'; $update_asap_message = 'Update to a supported minor as soon as possible to continue receiving security updates.'; -- GitLab