Skip to content

Instantly share code, notes, and snippets.

@RadekDvorak
Created July 1, 2013 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RadekDvorak/5899580 to your computer and use it in GitHub Desktop.
Save RadekDvorak/5899580 to your computer and use it in GitHub Desktop.
Git bisect script for guzzle #366
<?php
require __DIR__ . "/vendor/autoload.php";
class ImageDownloaderExample
{
private function downloadImage()
{
$client = new \Guzzle\Service\Client();
$request = $client->get("http://www.google.com/images/srpr/logo4w.png");
$response = $request->send();
$body = $response->getBody();
$stream = $body->getStream();
return $stream;
}
public function testStream()
{
$guzzleStream = $this->downloadImage();
return gettype($guzzleStream);
}
}
$downloader = new ImageDownloaderExample();
$type = $downloader->testStream();
if ($type === "unknown type")
{
exit(1);
}
else
{
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment