Esempio n. 1
0
 public function testDoesNotThrowInErrorEvent()
 {
     $client = new Client();
     $responses = [new Response(404)];
     $client->getEmitter()->attach(new Mock($responses));
     $requests = [$client->createRequest('GET', 'http://foo.com/baz')];
     $result = Pool::batch($client, $requests);
     $this->assertCount(1, $result);
     $this->assertInstanceOf('GuzzleHttp5Legacy\\Exception\\ClientException', $result[0]);
 }