You are here

private function StackedHttpKernelTest::assertTerminablesCalledOnce in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php \Stack\StackedHttpKernelTest::assertTerminablesCalledOnce()
1 call to StackedHttpKernelTest::assertTerminablesCalledOnce()
StackedHttpKernelTest::terminateShouldDelegateToMiddlewares in vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php
@test

File

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

Class

StackedHttpKernelTest

Namespace

Stack

Code

private function assertTerminablesCalledOnce(array $middlewares) {
  foreach ($middlewares as $kernel) {
    if ($kernel instanceof TerminableInterface) {
      $this
        ->assertEquals(1, $kernel
        ->terminateCallCount(), "Terminate was called {$kernel->terminateCallCount()} times");
    }
  }
}