You are here

public function TestServiceProvider::alter in Drupal 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceModifierInterface::alter

File

core/tests/Drupal/KernelTests/TestServiceProvider.php, line 32

Class

TestServiceProvider
Provides special routing services for tests.

Namespace

Drupal\KernelTests

Code

public function alter(ContainerBuilder $container) {
  if (static::$currentTest instanceof KernelTestBase) {
    static::addRouteProvider($container);
  }
}