function ModuleInstallerTest::register
Registers test-specific services.
Extend this method in your test to register additional services. This method is called whenever the kernel is rebuilt.
Parameters
\Drupal\Core\DependencyInjection\ContainerBuilder $container: The service container to enhance.
Overrides KernelTestBase::register
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php, line 287
Class
- ModuleInstallerTest
- Tests the ModuleInstaller class.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function register(ContainerBuilder $container) : void {
parent::register($container);
$container->register(__CLASS__, __CLASS__)
->setSynthetic(TRUE)
->addTag('logger');
$container->set(__CLASS__, $this);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.