You are here

public function DeprecatedCleanupTest::register in Drupal 8

Registers test-specific services.

Extend this method in your test to register additional services. This method is called whenever the kernel is rebuilt.

Parameters

\Drupal\Core\DependencyInjection\ContainerBuilder $container: The service container to enhance.

Overrides KernelTestBase::register

See also

\Drupal\Tests\KernelTestBase::bootKernel()

File

core/modules/simpletest/tests/src/Kernel/DeprecatedCleanupTest.php, line 23

Class

DeprecatedCleanupTest
Verify deprecation errors for the cleanup functions.

Namespace

Drupal\Tests\simpletest\Kernel

Code

public function register(ContainerBuilder $container) {
  parent::register($container);
  $cleaner_definition = new Definition(StubEnvironmentCleanerService::class);
  $container
    ->setDefinition('environment_cleaner', $cleaner_definition);
}