function CronQueueTest::register

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Kernel/System/CronQueueTest.php \Drupal\Tests\system\Kernel\System\CronQueueTest::register()

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

File

core/modules/system/tests/src/Kernel/System/CronQueueTest.php, line 344

Class

CronQueueTest
Tests the Cron Queue runner.

Namespace

Drupal\Tests\system\Kernel\System

Code

public function register(ContainerBuilder $container) {
  parent::register($container);
  $container->register('test_logger', get_class($this->logger
    ->reveal()))
    ->addTag('logger');
  $container->set('test_logger', $this->logger
    ->reveal());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.