You are here

public function BuilderTest::appendMiddlewareShouldAppendToBody in Zircon Profile 8

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

@test

File

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

Class

BuilderTest
@covers Stack\Builder

Namespace

Stack

Code

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