@covers Symfony\Component\HttpFoundation\Session\Session::getIterator
public function testGetIterator() {
$attributes = array(
'hello' => 'world',
'symfony2' => 'rocks',
);
foreach ($attributes as $key => $val) {
$this->session
->set($key, $val);
}
$i = 0;
foreach ($this->session as $key => $val) {
$this
->assertEquals($attributes[$key], $val);
$i++;
}
$this
->assertEquals(count($attributes), $i);
}