function ConstraintTest::testIsCompatible

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Component/Version/ConstraintTest.php \Drupal\Tests\Component\Version\ConstraintTest::testIsCompatible()
  2. 10 core/tests/Drupal/Tests/Component/Version/ConstraintTest.php \Drupal\Tests\Component\Version\ConstraintTest::testIsCompatible()
  3. 9 core/tests/Drupal/Tests/Component/Version/ConstraintTest.php \Drupal\Tests\Component\Version\ConstraintTest::testIsCompatible()
  4. 8.9.x core/tests/Drupal/Tests/Component/Version/ConstraintTest.php \Drupal\Tests\Component\Version\ConstraintTest::testIsCompatible()

Tests is compatible.

Attributes

#[DataProvider('providerIsCompatible')]

File

core/tests/Drupal/Tests/Component/Version/ConstraintTest.php, line 23

Class

ConstraintTest
Tests Drupal\Component\Version\Constraint.

Namespace

Drupal\Tests\Component\Version

Code

public function testIsCompatible(Constraint $version_info, string $current_version, bool $result) : void {
  $this->assertSame($result, $version_info->isCompatible($current_version));
}

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