/** * Load session object from an existing array * * Ensures $_SESSION is set to an instance of the object when complete. * * @param array $array * @return SessionStorage */ public function fromArray(array $array) { parent::fromArray($array); if ($_SESSION !== $this) { $_SESSION = $this; } return $this; }
public function testRequestAccessTimeIsPreservedEvenInFactoryMethod() { $this->assertNotEmpty($this->storage->getRequestAccessTime()); $this->storage->fromArray(array()); $this->assertNotEmpty($this->storage->getRequestAccessTime()); }