Example #1
0
 public function testReplace()
 {
     $array = array();
     $array['name'] = 'jack';
     $array['foo.bar'] = 'beep';
     $this->bag->replace($array);
     $this->assertEquals($array, $this->bag->all());
     $this->assertNull($this->bag->get('hello'));
     $this->assertNull($this->bag->get('always'));
     $this->assertNull($this->bag->get('user.login'));
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function replace(array $attributes)
 {
     parent::replace($attributes);
     $this->sessionStorage->save();
 }