Ejemplo n.º 1
0
 /**
  * Test rersponse serialization
  */
 public function testSerializeResponse()
 {
     $factory = new GuzzleMessageFactory();
     $serializer = new HttpDataSerializer($factory, new GuzzleStreamFactory());
     $response = $factory->createResponse(200, null, ['Content-type' => 'application/json'], 'Foo');
     $string = $serializer->serialize($response);
     static::assertEquals("RESPONSE\r\n" . "Content-type: application/json\r\n" . "\r\n" . 'Foo', $string);
 }