Skip to content

Commit aa9b86e

Browse files
committed
[HttpKernel] added the terminate() call to the Client
1 parent 2750adb commit aa9b86e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Symfony/Component/HttpKernel/Client.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\BrowserKit\Cookie as DomCookie;
2020
use Symfony\Component\BrowserKit\History;
2121
use Symfony\Component\BrowserKit\CookieJar;
22+
use Symfony\Component\HttpKernel\TerminableInterface;
2223

2324
/**
2425
* Client simulates a browser and makes requests to a Kernel object.
@@ -57,7 +58,13 @@ public function __construct(HttpKernelInterface $kernel, array $server = array()
5758
*/
5859
protected function doRequest($request)
5960
{
60-
return $this->kernel->handle($request);
61+
$response = $this->kernel->handle($request);
62+
63+
if ($this->kernel instanceof TerminableInterface) {
64+
$this->kernel->terminate($request, $response);
65+
}
66+
67+
return $response;
6168
}
6269

6370
/**

0 commit comments

Comments
 (0)