You are here

public function CommerceMollieTestsServiceProvider::alter in Commerce Mollie 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

tests/modules/commerce_mollie_tests/src/CommerceMollieTestsServiceProvider.php, line 16

Class

CommerceMollieTestsServiceProvider
Modifies the mollie encapsulation service.

Namespace

Drupal\commerce_mollie_tests

Code

public function alter(ContainerBuilder $container) {

  // Overrides language_manager class to test domain language negotiation.
  $definition = $container
    ->getDefinition('commerce_mollie.mollie.api');
  $definition
    ->setClass('Drupal\\commerce_mollie_tests\\Services\\MollieApiMock');
}