protected function setUp()
 {
     $this->attributes = new AttributeBag();
     $this->flashes = new FlashBag();
     $this->data = array($this->attributes->getStorageKey() => array('foo' => 'bar'), $this->flashes->getStorageKey() => array('notice' => 'hello'));
     $this->storage = new MockArraySessionStorage();
     $this->storage->registerBag($this->flashes);
     $this->storage->registerBag($this->attributes);
     $this->storage->setSessionData($this->data);
 }
 /**
  * {@inheritdoc}
  */
 public function regenerate($destroy = false, $lifetime = null)
 {
     if (!$this->started) {
         $this->start();
     }
     if ($destroy) {
         $this->destroy();
     }
     return parent::regenerate($destroy, $lifetime);
 }
 /**
  * @expectedException RuntimeException
  */
 public function testUnstartedSave()
 {
     $this->storage->save();
 }
 public function testGetId()
 {
     $this->assertEquals('', $this->storage->getId());
     $this->storage->start();
     $this->assertNotEquals('', $this->storage->getId());
 }