@covers Symfony\Component\HttpFoundation\Session\Flash\FlashBag::getIterator
public function testGetIterator() {
$flashes = array(
'hello' => 'world',
'beep' => 'boop',
'notice' => 'nope',
);
foreach ($flashes as $key => $val) {
$this->bag
->set($key, $val);
}
$i = 0;
foreach ($this->bag as $key => $val) {
$this
->assertEquals(array(
$flashes[$key],
), $val);
$i++;
}
$this
->assertEquals(count($flashes), $i);
$this
->assertEquals(0, count($this->bag));
}