You are here

public function DeprecatedCleanupTest::register in SimpleTest 8.3

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

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);
}