You are here

public function ClientTest::testHttps in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/fabpot/goutte/Goutte/Tests/ClientTest.php \Goutte\Tests\ClientTest::testHttps()

File

vendor/fabpot/goutte/Goutte/Tests/ClientTest.php, line 352

Class

ClientTest
Goutte Client Test.

Namespace

Goutte\Tests

Code

public function testHttps() {
  $guzzle = $this
    ->getGuzzle([
    new GuzzleResponse(200, [], '<html><body><p>Test</p></body></html>'),
  ]);
  $client = new Client();
  $client
    ->setClient($guzzle);
  $crawler = $client
    ->request('GET', 'https://www.example.com/');
  $this
    ->assertEquals('Test', $crawler
    ->filter('p')
    ->text());
}