We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cb12ef commit 8c33870Copy full SHA for 8c33870
Tests/Session/Flash/FlashBagTest.php
@@ -124,6 +124,19 @@ public function testKeys()
124
$this->assertEquals(array('notice'), $this->bag->keys());
125
}
126
127
+ public function testSetAll()
128
+ {
129
+ $this->bag->add('one_flash', 'Foo');
130
+ $this->bag->add('another_flash', 'Bar');
131
+ $this->assertTrue($this->bag->has('one_flash'));
132
+ $this->assertTrue($this->bag->has('another_flash'));
133
+ $this->bag->setAll(array('unique_flash' => 'FooBar'));
134
+ $this->assertFalse($this->bag->has('one_flash'));
135
+ $this->assertFalse($this->bag->has('another_flash'));
136
+ $this->assertSame(array('unique_flash' => 'FooBar'), $this->bag->all());
137
+ $this->assertSame(array(), $this->bag->all());
138
+ }
139
+
140
public function testPeekAll()
141
{
142
$this->bag->set('notice', 'Foo');
0 commit comments