private function StackedHttpKernelTest::getTerminableMock in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php \Stack\StackedHttpKernelTest::getTerminableMock()
File
- vendor/
stack/ builder/ tests/ unit/ Stack/ StackedHttpKernelTest.php, line 76
Class
Namespace
StackCode
private function getTerminableMock(Response $response = null) {
$app = $this
->getMock('Stack\\TerminableHttpKernel');
if ($response) {
$app
->expects($this
->any())
->method('handle')
->with($this
->isInstanceOf('Symfony\\Component\\HttpFoundation\\Request'))
->will($this
->returnValue($response));
}
$app
->expects($this
->once())
->method('terminate')
->with($this
->isInstanceOf('Symfony\\Component\\HttpFoundation\\Request'), $this
->isInstanceOf('Symfony\\Component\\HttpFoundation\\Response'));
return $app;
}