class ServicesTest
Tests that Package Manager services are wired correctly.
@group package_manager @internal
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \PHPUnit\Framework\TestCase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\PhpUnitCompatibilityTrait, \Prophecy\PhpUnit\ProphecyTrait, \Drupal\TestTools\Extension\DeprecationBridge\ExpectDeprecationTrait
- class \Drupal\Tests\package_manager\Kernel\ServicesTest extends \Drupal\KernelTests\KernelTestBase uses \Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait
Expanded class hierarchy of ServicesTest
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ ServicesTest.php, line 28
Namespace
Drupal\Tests\package_manager\KernelView 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.