Beispiel #1
0
 /**
  * Tests get- and setData methods.
  */
 public function testGetSetData()
 {
     $response = new Response(array(new ValueObject('test')));
     $this->assertCount(1, $response->getData());
     $response->setData(array(new ValueObject('test'), new ValueObject('test')));
     $this->assertCount(2, $response->getData());
 }
 /**
  * {@inheritdoc}
  */
 public function receive(Request $request)
 {
     $response = new Response();
     $data = $this->getGoogleNewsXml();
     $response->setData(new \ArrayIterator(array($data)));
     return $response;
 }