function ProjectCoreCompatibilityTest::testSetProjectCoreCompatibilityRanges

Same name in other branches
  1. 9 core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php \Drupal\Tests\update\Unit\ProjectCoreCompatibilityTest::testSetProjectCoreCompatibilityRanges()
  2. 8.9.x core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php \Drupal\Tests\update\Unit\ProjectCoreCompatibilityTest::testSetProjectCoreCompatibilityRanges()
  3. 10 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 21

Class

ProjectCoreCompatibilityTest
@coversDefaultClass \Drupal\update\ProjectCoreCompatibility

Namespace

Drupal\Tests\update\Unit

Code

public function testSetProjectCoreCompatibilityRanges(array $project_data, $core_data, array $supported_branches, array $core_releases, array $expected_releases, array $expected_security_updates) : void {
    $project_compatibility = new ProjectCoreCompatibility($core_data, $core_releases, $supported_branches);
    $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']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.