You are here

class CloudflareFormTesterServiceProvider in CloudFlare 8

Modifies the language manager service.

Hierarchy

Expanded class hierarchy of CloudflareFormTesterServiceProvider

File

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

Namespace

Drupal\cloudflare_form_tester
View source
class CloudflareFormTesterServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  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');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CloudflareFormTesterServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1