Exemple #1
0
 /**
  * Testing that the HTTP cookies can be set from overrides or super-globals during object construction.
  */
 public function testSetHTTPCookies()
 {
     $request = new Request(array('method' => 'GET', 'cookies' => array('username' => 'bob')));
     $this->assertEquals('bob', $request->getCookie('username'), 'Testing that the HTTP cookies can be set from overrides or super-globals during object construction');
     $_COOKIE['username'] = '******';
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $request = new Request();
     $this->assertEquals('bob', $request->getCookie('username'), 'Testing that the HTTP cookies can be set from overrides or super-globals during object construction');
 }