function ComposerTest::testEnsureComposerVersion

Verify that Composer::ensureComposerVersion() doesn't break.

@covers ::ensureComposerVersion

File

core/tests/Drupal/Tests/Composer/ComposerTest.php, line 21

Class

ComposerTest
@coversDefaultClass \Drupal\Composer\Composer[[api-linebreak]] @group Composer

Namespace

Drupal\Tests\Composer

Code

public function testEnsureComposerVersion() : void {
  try {
    $this->assertNull(Composer::ensureComposerVersion());
  } catch (\RuntimeException $e) {
    $this->assertMatchesRegularExpression('/Drupal core development requires Composer 2.3.5, but Composer /', $e->getMessage());
  }
}

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