/** * Explicitly sets the content of the request body * * @param string $content The body content, for example arguments of a PUT request * @return void * @api */ public function setContent($content) { parent::setContent($content); $this->arguments = $this->buildUnifiedArguments($this->arguments, array(), array()); }
/** * @test */ public function cookieConvenienceMethodsUseMethodsOfHeadersObject() { $cookie = new Cookie('foo', 'bar'); $message = new Message(); $message->setCookie($cookie); $this->assertSame($cookie, $message->getCookie('foo')); $this->assertSame($cookie, $message->getHeaders()->getCookie('foo')); $this->assertSame(array('foo' => $cookie), $message->getCookies()); $this->assertTrue($message->hasCookie('foo')); $message->removeCookie('foo'); $this->assertFalse($message->hasCookie('foo')); }