function RecipeEventsTest::register

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Recipe/RecipeEventsTest.php \Drupal\KernelTests\Core\Recipe\RecipeEventsTest::register()

Overrides KernelTestBase::register

File

core/tests/Drupal/KernelTests/Core/Recipe/RecipeEventsTest.php, line 42

Class

RecipeEventsTest
@group Recipe

Namespace

Drupal\KernelTests\Core\Recipe

Code

public function register(ContainerBuilder $container) : void {
    parent::register($container);
    // Every time the container is rebuilt, ensure this object is subscribing to
    // events.
    $container->getDefinition('event_dispatcher')
        ->addMethodCall('addSubscriber', [
        $this,
    ]);
}

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