Example #1
0
 public function testAllowsFunctionalMapping()
 {
     $this->coll->merge(array('number_1' => 1, 'number_2' => 2, 'number_3' => 3));
     $mapped = $this->coll->map(function ($key, $value) {
         return $value * $value;
     });
     $this->assertNotEquals($mapped, $this->coll);
     $this->assertEquals(array('number_1' => 1, 'number_2' => 4, 'number_3' => 9), $mapped->getAll());
 }