You are here

public function BuilderTest::resolveShouldCallSpecFactories in Zircon Profile 8

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

@test

File

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

Class

BuilderTest
@covers Stack\Builder

Namespace

Stack

Code

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