Пример #1
0
 /**
  * @covers spriebsch\session\PhpSessionBackend::destroy
  */
 public function testDestroySetsCookie()
 {
     if (!in_array('xdebug', get_loaded_extensions())) {
         $this->markTestSkipped('xdebug not available');
     }
     $this->backend->startSession($this->sessionName, 300, '/', '.example.com');
     $this->backend->destroy();
     $headers = xdebug_get_headers();
     $header = array_pop($headers);
     $this->assertContains('Set-Cookie:', $header);
     $this->assertContains($this->sessionName . '=deleted', $header);
 }
Пример #2
0
 /**
  * @covers spriebsch\session\PhpSessionBackend::destroy
  */
 public function testDestroyDestroysSession()
 {
     $this->backend->startSession('', '', '', '');
     $this->backend->destroy();
     $this->assertEmpty($this->backend->getSessionId());
 }