class ServicesTest

Tests that Package Manager services are wired correctly.

@group package_manager @internal

Hierarchy

Expanded class hierarchy of ServicesTest

File

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

Namespace

Drupal\Tests\package_manager\Kernel
View source
class ServicesTest extends KernelTestBase {
    use AssertPreconditionsTrait;
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'package_manager',
        'update',
    ];
    
    /**
     * Tests that Package Manager's public services can be instantiated.
     */
    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.