You are here

private function StackedHttpKernelTest::getDelegatingTerminableMock in Zircon Profile 8.0

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

File

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

Class

StackedHttpKernelTest

Namespace

Stack

Code

private function getDelegatingTerminableMock(TerminableInterface $next) {
  $app = $this
    ->getMock('Stack\\TerminableHttpKernel');
  $app
    ->expects($this
    ->once())
    ->method('terminate')
    ->with($this
    ->isInstanceOf('Symfony\\Component\\HttpFoundation\\Request'), $this
    ->isInstanceOf('Symfony\\Component\\HttpFoundation\\Response'))
    ->will($this
    ->returnCallback(function ($request, $response) use ($next) {
    $next
      ->terminate($request, $response);
  }));
  return $app;
}