예제 #1
0
파일: Request.php 프로젝트: nxpthx/FLOW3
 /**
  * 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());
 }
예제 #2
0
 /**
  * @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'));
 }