You are here

public function ProjectCoreCompatibilityTest::testSetProjectCoreCompatibilityRanges in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php \Drupal\Tests\update\Unit\ProjectCoreCompatibilityTest::testSetProjectCoreCompatibilityRanges()

@covers ::setReleaseMessage @dataProvider providerSetProjectCoreCompatibilityRanges

File

core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php, line 19

Class

ProjectCoreCompatibilityTest
@coversDefaultClass \Drupal\update\ProjectCoreCompatibility

Namespace

Drupal\Tests\update\Unit

Code

public function testSetProjectCoreCompatibilityRanges(array $project_data, $core_data, array $core_releases, array $expected_releases, array $expected_security_updates) {
  $project_compatibility = new ProjectCoreCompatibility($core_data, $core_releases);
  $project_compatibility
    ->setStringTranslation($this
    ->getStringTranslationStub());
  $project_compatibility
    ->setReleaseMessage($project_data);
  $this
    ->assertSame($expected_releases, $project_data['releases']);
  $this
    ->assertSame($expected_security_updates, $project_data['security updates']);
}