/** * Tests whether getContent() / setContent() / appendContent() work as expected. * * @return void */ public function testContentHandling() { $message = new HttpRequest(); $this->assertSame('', $message->getContent()); $message->setContent('foo'); $this->assertSame('foo', $message->getContent()); $message->appendContent('foo'); $this->assertSame('foofoo', $message->getContent()); $message->appendContent('bar'); $this->assertSame('foofoobar', $message->getContent()); $message->setContent(null); $this->assertSame(null, $message->getContent()); }