You are here

public function ApigeeMockApiClientServiceProvider::alter in Apigee Edge 8

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceProviderBase::alter

File

tests/modules/apigee_mock_api_client/src/ApigeeMockApiClientServiceProvider.php, line 41

Class

ApigeeMockApiClientServiceProvider
Class ApigeeMockClientServiceProvider.

Namespace

Drupal\apigee_mock_api_client

Code

public function alter(ContainerBuilder $container) {

  // Override the ClientFactory with our mock client factory.
  $container
    ->getDefinition('apigee_edge.sdk_connector')
    ->replaceArgument(0, new Reference('apigee_mock_api_client.mock_http_client_factory'));
}