class PackageManagerTestValidationServiceProvider
Modifies container services for testing.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface, \Drupal\Core\DependencyInjection\ServiceModifierInterface
- class \Drupal\package_manager_test_validation\PackageManagerTestValidationServiceProvider extends \Drupal\Core\DependencyInjection\ServiceProviderBase
Expanded class hierarchy of PackageManagerTestValidationServiceProvider
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_test_validation/ src/ PackageManagerTestValidationServiceProvider.php, line 15
Namespace
Drupal\package_manager_test_validationView source
class PackageManagerTestValidationServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) : void {
parent::alter($container);
$service_id = StagedDBUpdateValidator::class;
if ($container->hasDefinition($service_id)) {
$container->getDefinition($service_id)
->setClass(StagedDatabaseUpdateValidator::class)
->addMethodCall('setState', [
new Reference('state'),
]);
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
PackageManagerTestValidationServiceProvider::alter | public | function | Overrides ServiceProviderBase::alter | ||
ServiceProviderBase::register | public | function | Overrides ServiceProviderInterface::register | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.