You are here

protected function RngMessageRules::terminateRequest in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/RngMessageRules.php \Drupal\Tests\rng\Kernel\RngMessageRules::terminateRequest()
  2. 8 tests/src/Kernel/RngMessageRules.php \Drupal\Tests\rng\Kernel\RngMessageRules::terminateRequest()

Simulate request termination.

2 calls to RngMessageRules::terminateRequest()
RngMessageRules::testRngRegistrationCreateMessages in tests/src/Kernel/RngMessageRules.php
Test messages are sent on registration creation.
RngMessageRules::testRngRegistrationUpdateMessages in tests/src/Kernel/RngMessageRules.php
Test messages are sent on registration update.

File

tests/src/Kernel/RngMessageRules.php, line 171

Class

RngMessageRules
Tests RNG message rules are executed.

Namespace

Drupal\Tests\rng\Kernel

Code

protected function terminateRequest() {
  $request = $this->container
    ->get('request_stack')
    ->getCurrentRequest();
  $kernel = $this->container
    ->get('kernel');
  $response = new Response();
  $kernel
    ->terminate($request, $response);
}