class AcquiaContenthubServerTestServiceProvider in Acquia Content Hub 8.2
Replace Content Hub Client Factory service for testing purposes.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\acquia_contenthub_server_test\AcquiaContenthubServerTestServiceProvider
Expanded class hierarchy of AcquiaContenthubServerTestServiceProvider
File
- tests/
modules/ acquia_contenthub_server_test/ src/ AcquiaContenthubServerTestServiceProvider.php, line 12
Namespace
Drupal\acquia_contenthub_server_testView source
class AcquiaContenthubServerTestServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$client_factory_def = $container
->getDefinition('acquia_contenthub.client.factory');
$client_factory_def
->setClass('Drupal\\acquia_contenthub_server_test\\Client\\ClientFactoryMock');
$pv_client_def = $container
->getDefinition('acquia_contenthub.project_version_client');
$pv_client_def
->setClass(ProjectVersionClientMock::class);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AcquiaContenthubServerTestServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |