[http kernel] Added client response type test.

This commit is contained in:
jeanfrancois.simon 2012-06-05 10:37:51 +02:00
parent ce7e1e6c9a
commit 686854b245
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\HttpKernel\Tests;
use Symfony\Component\BrowserKit\Response as DomResponse;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\HttpFoundation\Request;
@ -34,6 +35,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
$client->request('GET', '/');
$this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request');
$this->assertTrue($client->getResponse() instanceof DomResponse, '->getResponse() returns a Symfony\Component\BrowserKit\Response instance');
$client->request('GET', 'http://www.example.com/');
$this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request');