class SalesforceTestRestClientServiceProvider in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 tests/modules/salesforce_test_rest_client/src/SalesforceTestRestClientServiceProvider.php \Drupal\salesforce_test_rest_client\SalesforceTestRestClientServiceProvider
- 5.0.x tests/modules/salesforce_test_rest_client/src/SalesforceTestRestClientServiceProvider.php \Drupal\salesforce_test_rest_client\SalesforceTestRestClientServiceProvider
Modifies the salesforce client service.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\salesforce_test_rest_client\SalesforceTestRestClientServiceProvider
Expanded class hierarchy of SalesforceTestRestClientServiceProvider
File
- tests/
modules/ salesforce_test_rest_client/ src/ SalesforceTestRestClientServiceProvider.php, line 15
Namespace
Drupal\salesforce_test_rest_clientView source
class SalesforceTestRestClientServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
// Overrides salesforce.client class to stub in our own fake methods.
$container
->getDefinition('http_client_factory')
->setClass(TestHttpClientFactory::class);
$container
->getDefinition('salesforce.client')
->setClass(TestRestClient::class);
$container
->getDefinition('salesforce.client')
->setClass(TestRestClient::class);
$container
->getDefinition('plugin.manager.salesforce.auth_providers')
->setClass(TestSalesforceAuthProviderPluginManager::class);
$container
->getDefinition('salesforce.http_client_wrapper')
->setClass(TestHttpClientWrapper::class);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SalesforceTestRestClientServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |