You are here

public function ClientTest::testGetResponse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testGetResponse()

File

vendor/symfony/browser-kit/Tests/ClientTest.php, line 113

Class

ClientTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testGetResponse() {
  $client = new TestClient();
  $client
    ->setNextResponse(new Response('foo'));
  $client
    ->request('GET', 'http://example.com/');
  $this
    ->assertEquals('foo', $client
    ->getResponse()
    ->getContent(), '->getCrawler() returns the Response of the last request');
  $this
    ->assertInstanceOf('Symfony\\Component\\BrowserKit\\Response', $client
    ->getResponse(), '->getCrawler() returns the Response of the last request');
}