You are here

public function TerminableKernelSpy::terminate in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php \Stack\TerminableKernelSpy::terminate()

Terminates a request/response cycle.

Should be called after sending the response and before shutting down the kernel.

Parameters

Request $request A Request instance:

Response $response A Response instance:

Overrides TerminableInterface::terminate

File

vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php, line 142

Class

TerminableKernelSpy

Namespace

Stack

Code

public function terminate(Request $request, Response $response) {
  $this->terminateCallCount++;
  if ($this->kernel && $this->kernel instanceof TerminableInterface) {
    return $this->kernel
      ->terminate($request, $response);
  }
}