/**
  * Test $_SESSION is populated as empty array if no HTTP cookie
  */
 public function testSessionIsPopulatedAsEmptyIfNoCookie()
 {
     Slim_Environment::mock(array('SCRIPT_NAME' => '/index.php', 'PATH_INFO' => '/foo'));
     $app = new Slim();
     $app->get('/foo', function () {
         echo "Success";
     });
     $mw = new Slim_Middleware_SessionCookie(array('expires' => '10 years'));
     $mw->setApplication($app);
     $mw->setNextMiddleware($app);
     $mw->call();
     $this->assertEquals(array(), $_SESSION);
 }
 /**
  * Test $_SESSION is populated as empty array if no HTTP cookie
  */
 public function testSessionIsPopulatedAsEmptyIfNoCookie()
 {
     $env = array('REQUEST_METHOD' => 'GET', 'REMOTE_ADDR' => '127.0.0.1', 'SCRIPT_NAME' => '/foo/index.php', 'PATH_INFO' => '/bar', 'QUERY_STRING' => 'one=1&two=2&three=3', 'SERVER_NAME' => 'slim', 'SERVER_PORT' => 80, 'slim.url_scheme' => 'http', 'slim.input' => '', 'slim.errors' => fopen('php://stderr', 'w'));
     $app = new CustomAppGet();
     $mw = new Slim_Middleware_SessionCookie($app);
     list($status, $header, $body) = $mw->call($env);
     $this->assertEquals(array(), $_SESSION);
 }