function FakeSiteFixtureTest::testCallToComposerInspectorMethods

Tests calls to ComposerInspector class methods.

File

core/modules/package_manager/tests/src/Kernel/FakeSiteFixtureTest.php, line 34

Class

FakeSiteFixtureTest
Test that the 'fake-site' fixture is a valid starting point.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testCallToComposerInspectorMethods() : void {
    $active_dir = $this->container
        ->get(PathLocator::class)
        ->getProjectRoot();
    
    /** @var \Drupal\package_manager\ComposerInspector $inspector */
    $inspector = $this->container
        ->get(ComposerInspector::class);
    $list = $inspector->getInstalledPackagesList($active_dir);
    $this->assertNull($list->getPackageByDrupalProjectName('any_random_name'));
    $this->assertFalse(isset($list['drupal/any_random_name']));
}

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