Exemplo n.º 1
0
 public function testEach()
 {
     $result = [];
     $map = new Map(['b' => 'bval', 'a' => 'aval', 'c' => 'cval']);
     $map->each(function ($key, $value) use(&$result) {
         $result[$key] = $value;
     });
     $this->assertEquals($map->toArray(), $result);
 }