function ComposerInspectorTest::testRootPackageInfo

Same name and namespace in other branches
  1. 11.x core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php \Drupal\Tests\package_manager\Kernel\ComposerInspectorTest::testRootPackageInfo()

Tests root package info.

@legacy-covers ::getRootPackageInfo

File

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

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.