function FakeSiteFixtureTest::testExpectedPackages

Checks that the expected packages are installed in the fake site fixture.

File

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

Class

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

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testExpectedPackages() : void {
    $project_root = $this->container
        ->get(PathLocator::class)
        ->getProjectRoot();
    $installed_packages = $this->container
        ->get(ComposerInspector::class)
        ->getInstalledPackagesList($project_root)
        ->getArrayCopy();
    ksort($installed_packages);
    $this->assertSame($this->getExpectedFakeSitePackages(), array_keys($installed_packages));
}

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