You are here

public function SystemListTest::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/tests/Drupal/KernelTests/Core/Theme/SystemListTest.php, line 27

Class

SystemListTest
Tests system_list() function.

Namespace

Drupal\KernelTests\Core\Theme

Code

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

  // Some test methods involve ModuleHandler operations, which attempt to
  // rebuild and dump routes.
  $container
    ->register('router.dumper', NullMatcherDumper::class);
}