You are here

public function FixedBlockContentKernelTestBase::register in Fixed Block Content 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

tests/src/Kernel/FixedBlockContentKernelTestBase.php, line 51

Class

FixedBlockContentKernelTestBase
Basic setup for fixed block content kernel tests.

Namespace

Drupal\Tests\fixed_block_content\Kernel

Code

public function register(ContainerBuilder $container) {
  parent::register($container);

  // Set a real lock service.
  $container
    ->setDefinition('lock', new Definition(PersistentDatabaseLockBackend::class, [
    $container
      ->get('database'),
  ]));
}