You are here

public function StackedHttpKernelTest::handleShouldStillDelegateToAppWithMiddlewares in Zircon Profile 8

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

@test

File

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

Class

StackedHttpKernelTest

Namespace

Stack

Code

public function handleShouldStillDelegateToAppWithMiddlewares() {
  $app = $this
    ->getHttpKernelMock(new Response('ok'));
  $bar = $this
    ->getHttpKernelMock(new Response('bar'));
  $foo = $this
    ->getHttpKernelMock(new Response('foo'));
  $kernel = new StackedHttpKernel($app, array(
    $foo,
    $bar,
    $app,
  ));
  $request = Request::create('/');
  $response = $kernel
    ->handle($request);
  $this
    ->assertSame('ok', $response
    ->getContent());
}