title: GuzzlePHP mock response content
body: <p>I want to mock a response to the Guzzle request:</p>
  
  <pre><code> $response = new Response(200, ['X-Foo' =&gt; 'Bar']);
  
   //how do I set content of $response to--&gt; "some mocked content"
  
   $client = Mockery::mock('GuzzleHttp\Client');
   $client-&gt;shouldReceive('get')-&gt;once()-&gt;andReturn($response);
  </code></pre>
  
  <p>I noticed I need to add as third parameter the interface:</p>
  
  <pre><code> GuzzleHttp\Stream\StreamInterface
  </code></pre>
  
  <p>but there are so many implementations of it, and I want to return a simple string. Any ideas?</p>
  
  <p>Edit: now I use this:</p>
  
  <pre><code> $response = new Response(200, [], GuzzleHttp\Stream\Stream::factory('bad xml here'));
  </code></pre>
  
  <p>but when I check this:</p>
  
  <pre><code>$response-&gt;getBody()-&gt;getContents()
  </code></pre>
  
  <p>I get an empty string. Why is this? </p>
  
  <p>Edit 2: this happened to me only when I used xdebug, when it runs normally it works great!</p>