commercetools-8.x-1.2-alpha1/tests/modules/commercetools_test/commercetools_test.services.yml

tests/modules/commercetools_test/commercetools_test.services.yml
services:
  commercetools_test.http_client_factory_mock:
    class: Drupal\commercetools_test\CommercetoolsHttpClientFactoryMock
    arguments:
      $stack: '@http_handler_stack'
      $state: '@state'
      $configFactory: '@config.factory'
      $lock: '@lock'
    tags:
      - { name: event_subscriber }

  # Override the original service to pass the mocked HTTP client factory.
  commercetools.api:
    class: Drupal\commercetools\CommercetoolsApiService
    arguments:
      $eventDispatcher: '@event_dispatcher'
      $ctConfig: '@commercetools.config'
      $logger: '@logger.channel.commercetools'
      $httpClientFactory: '@commercetools_test.http_client_factory_mock'
      $cacheBackend: '@cache.default'
      $psrCache: '@commercetools.psr_cache_adapter'
      $time: '@datetime.time'
      $configFactory: '@config.factory'

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc