You are here

public function CloudflareFormTesterServiceProvider::alter in CloudFlare 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

tests/modules/cloudflare_form_tester/src/CloudflareFormTesterServiceProvider.php, line 16

Class

CloudflareFormTesterServiceProvider
Modifies the language manager service.

Namespace

Drupal\cloudflare_form_tester

Code

public function alter(ContainerBuilder $container) {

  // Overrides language_manager class to test domain language negotiation.
  $definition = $container
    ->getDefinition('cloudflare.composer_dependency_check');
  $definition
    ->setClass('Drupal\\cloudflare_form_tester\\Mocks\\ComposerDependenciesCheckMock');
  $definition = $container
    ->getDefinition('cloudflare.zone');
  $definition
    ->setClass('Drupal\\cloudflare_form_tester\\Mocks\\ZoneMock');
}