Issue #3469583 by catch, pooja_sharma: Speed up UpdateSemverTestSecurityCoverageTest

(cherry picked from commit 04fcdb4758)
merge-requests/9339/head
nod_ 2024-08-27 11:30:05 +02:00
parent 1fd180cf3e
commit 45e03ba945
No known key found for this signature in database
GPG Key ID: 76624892606FA197
1 changed files with 11 additions and 5 deletions

View File

@ -8,10 +8,18 @@ namespace Drupal\Tests\update\Functional;
* 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 @@ class UpdateSemverCoreSecurityCoverageTest extends UpdateSemverCoreTestBase {
* - 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.';