public function testSetGetBody() { $body = 'my test body'; $this->serializer->expects($this->once())->method('serialize')->with($this->equalTo($body), $this->equalTo(array()))->will($this->returnValue($body)); $this->request->setBody($body); $this->assertSame($body, $this->request->getBody()); }