migrate() публичный Метод

Migrates the session to a new session id while maintaining session attributes
С версии: 1.9
public migrate ( boolean $destroy = false ) : boolean
$destroy boolean Whether to delete the session or let gc handle clean up
Результат boolean
 public function testMigrate()
 {
     $session = new ElggSession(new Elgg_Http_MockSessionStorage());
     $session->start();
     $session->set('foo', 5);
     $id = $session->getId();
     $this->assertTrue($session->migrate());
     $this->assertTrue($session->has('foo'));
     $this->assertNotEquals($id, $session->getId());
     $this->assertTrue($session->has('__elgg_session'));
 }