format() public method

Formats the specified response.
public format ( Response $response )
$response Response the response to be formatted.
 /**
  * @param mixed  $data the data to be formatted
  * @param string $xml  the expected XML body
  * @dataProvider formatObjectDataProvider
  */
 public function testFormatObjects($data, $xml)
 {
     $head = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
     $this->response->data = $data;
     $this->formatter->format($this->response);
     $this->assertEquals($head . $xml, $this->response->content);
 }