public function getBody() { trigger_error('Retrofit Deprecation: This method is deprecated, use getRequest() instead', E_USER_DEPRECATED); return (string) $this->request->getBody(); }
public function testGetBody() { $this->disableDeprecationWarning(); $event = new BeforeSendEvent(new Request('POST', 'http://mockservice.com/post', ['foo' => 'bar'], 'body')); $this->assertSame('body', $event->getBody()); $this->enableDeprecationWarning(); }