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); }
public function testGetStorageKey() { $this->assertEquals('_sf2_flashes', $this->bag->getStorageKey()); $attributeBag = new FlashBag('test'); $this->assertEquals('test', $attributeBag->getStorageKey()); }