Skip to content

Commit 686854b

Browse files
author
jeanfrancois.simon
committed
[http kernel] Added client response type test.
1 parent ce7e1e6 commit 686854b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/HttpKernel/Tests/ClientTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\HttpKernel\Tests;
1313

14+
use Symfony\Component\BrowserKit\Response as DomResponse;
1415
use Symfony\Component\HttpKernel\Client;
1516
use Symfony\Component\HttpKernel\HttpKernel;
1617
use Symfony\Component\HttpFoundation\Request;
@@ -34,6 +35,7 @@ public function testDoRequest()
3435

3536
$client->request('GET', '/');
3637
$this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request');
38+
$this->assertTrue($client->getResponse() instanceof DomResponse, '->getResponse() returns a Symfony\Component\BrowserKit\Response instance');
3739

3840
$client->request('GET', 'http://www.example.com/');
3941
$this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request');

0 commit comments

Comments
 (0)