You are here

public function BuilderTest::resolveShouldPassPushArgumentsToMiddlewareConstructor in Zircon Profile 8

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

@test

File

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

Class

BuilderTest
@covers Stack\Builder

Namespace

Stack

Code

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