Exemplo n.º 1
0
 /**
  * Test mapping callback to new collection
  *
  * @return void
  */
 public function testMap()
 {
     $collection = $this->collection->map(function ($value, $key) {
         return 2 * $value;
     });
     $this->assertAttributeEquals([2, 4, 6], 'elements', $collection);
     $this->assertAttributeEquals([1, 2, 3], 'elements', $this->collection);
 }