public function testStartingSessionTwiceCausesNoWarning()
 {
     $session = new SessionMiddleware([]);
     $this->assertEquals(PHP_SESSION_NONE, session_status());
     @$session->start();
     // silence cookie warning
     $this->assertEquals(PHP_SESSION_ACTIVE, session_status());
     $session->start();
     $this->assertEquals(PHP_SESSION_ACTIVE, session_status());
 }
 public function testCallStartsSession()
 {
     $next = $this->getMock('NextMiddleware', array('call'));
     $next->expects($this->once())->method('call');
     $session = new SessionMiddleware([]);
     $session->setNextMiddleware($next);
     $this->assertEquals(PHP_SESSION_NONE, session_status());
     @$session->call();
     // silence cookie warning
     $this->assertEquals(PHP_SESSION_ACTIVE, session_status());
 }