function ServicesTest::testPackageManagerServices

Tests that Package Manager's public services can be instantiated.

File

core/modules/package_manager/tests/src/Kernel/ServicesTest.php, line 40

Class

ServicesTest
Tests that Package Manager services are wired correctly.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testPackageManagerServices() : void {
    // Ensure that any overridden Composer Stager services were overridden
    // correctly.
    $overrides = [
        ExecutableFinderInterface::class => ExecutableFinder::class,
        ProcessFactoryInterface::class => ProcessFactory::class,
        TranslatableFactoryInterface::class => TranslatableStringFactory::class,
        BeginnerInterface::class => LoggingBeginner::class,
        StagerInterface::class => LoggingStager::class,
        CommitterInterface::class => LoggingCommitter::class,
    ];
    foreach ($overrides as $interface => $expected_class) {
        $this->assertInstanceOf($expected_class, $this->container
            ->get($interface));
    }
}

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