class KernelSpy in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php \Stack\KernelSpy
Hierarchy
- class \Stack\KernelSpy implements HttpKernelInterface
Expanded class hierarchy of KernelSpy
File
- vendor/
stack/ builder/ tests/ unit/ Stack/ StackedHttpKernelTest.php, line 112
Namespace
StackView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HttpKernelInterface:: |
constant | |||
HttpKernelInterface:: |
constant | |||
KernelSpy:: |
private | property | ||
KernelSpy:: |
public | function |
Handles a Request to convert it to a Response. Overrides HttpKernelInterface:: |
|
KernelSpy:: |
public | function | ||
KernelSpy:: |
public | function |