Пример #1
0
 /**
  * @param  Response $response
  * @param  string   $responseFormat
  *
  * @return array
  */
 protected function getUnserializedData(Response $response, $responseFormat)
 {
     return UnserializerBuilder::create($responseFormat)->unserialize($response->getBody()->getContents());
 }
 public function testUnserialize()
 {
     $unserializedData = UnserializerBuilder::create('json')->unserialize(json_encode(array('fake' => 'data')));
     $this->assertEquals('data', $unserializedData['fake']);
 }