function ExceptionLoggingSubscriberTest::register

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php \Drupal\KernelTests\Core\EventSubscriber\ExceptionLoggingSubscriberTest::register()

Overrides KernelTestBase::register

File

core/tests/Drupal/KernelTests/Core/EventSubscriber/ExceptionLoggingSubscriberTest.php, line 93

Class

ExceptionLoggingSubscriberTest
Tests that HTTP exceptions are logged correctly.

Namespace

Drupal\KernelTests\Core\EventSubscriber

Code

public function register(ContainerBuilder $container) {
    parent::register($container);
    $container->register($this->testLogServiceName, BufferingLogger::class)
        ->addTag('logger');
}

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