public function testToStringWithBody() { $this->request->setHost('test.bitpay.com'); $this->request->setBody('{"json":true}'); $raw = array('POST https://test.bitpay.com:443/ HTTP/1.1', 'Content-Type: application/json', 'Content-Length: 13', '', '{"json":true}'); $raw = implode("\r\n", $raw); $this->assertSame($raw, (string) $this->request); }