You are here

class KernelSpy in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php \Stack\KernelSpy

Hierarchy

Expanded class hierarchy of KernelSpy

File

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

Namespace

Stack
View source
class KernelSpy implements HttpKernelInterface {
  private $handleCallCount = 0;
  public function __construct(HttpKernelInterface $kernel = null) {
    $this->kernel = $kernel;
  }
  public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) {
    $this->handleCallCount++;
    if ($this->kernel) {
      return $this->kernel
        ->handle($request, $type, $catch);
    }
    return new Response('OK');
  }
  public function handleCallCount() {
    return $this->handleCallCount;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HttpKernelInterface::MASTER_REQUEST constant
HttpKernelInterface::SUB_REQUEST constant
KernelSpy::$handleCallCount private property
KernelSpy::handle public function Handles a Request to convert it to a Response. Overrides HttpKernelInterface::handle
KernelSpy::handleCallCount public function
KernelSpy::__construct public function