Ejemplo n.º 1
0
 /**
  * Test Slim sets Cookies in Response
  *
  * Pre-conditions:
  * You have initialized a Slim application and you
  * set a session variable.
  *
  * Post-conditions:
  * The Response has a Cookie object with the expected
  * name and value.
  */
 public function testSlimSetsCookie()
 {
     Slim::init();
     Slim::session('testCookie', 'testValue');
     $cookies = Slim::response()->getCookies();
     $this->assertEquals('testCookie', $cookies[0]->name);
     $this->assertEquals('testValue', $cookies[0]->value);
 }