function ProjectCoreCompatibilityTest::testSetProjectCoreCompatibilityRanges

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

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