function ComposerInspectorTest::testRootPackageInfo

Tests root package info.

@legacy-covers ::getRootPackageInfo

File

core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php, line 364

Class

ComposerInspectorTest
Tests Drupal\package_manager\ComposerInspector.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testRootPackageInfo() : void {
  $project_root = $this->container
    ->get(PathLocator::class)
    ->getProjectRoot();
  $info = $this->container
    ->get(ComposerInspector::class)
    ->getRootPackageInfo($project_root);
  $this->assertSame('fake/site', $info['name']);
}

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