You are here

public function BuilderTest::stackedMiddlewaresShouldWrapInReverseOrder in Zircon Profile 8

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

@test

File

vendor/stack/builder/tests/unit/Stack/BuilderTest.php, line 105

Class

BuilderTest
@covers Stack\Builder

Namespace

Stack

Code

public function stackedMiddlewaresShouldWrapInReverseOrder() {
  $app = $this
    ->getHttpKernelMock(new Response('ok'));
  $stack = new Builder();
  $stack
    ->push('Stack\\AppendA');
  $stack
    ->push('Stack\\AppendB');
  $resolved = $stack
    ->resolve($app);
  $request = Request::create('/');
  $response = $resolved
    ->handle($request);
  $this
    ->assertSame('ok.B.A', $response
    ->getContent());
}