public function ClientTest::testHttps in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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\TestsCode
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());
}