Exemplo n.º 1
0
 public function testMap()
 {
     $instance = new Collection(['item' => 'data']);
     $expected = $instance->map(function ($item) {
         return $item . '-extended';
     });
     $this->assertInstanceOf(Collection::class, $expected);
     $this->assertNotSame($instance, $expected);
     $this->assertSame('data-extended', $expected->get('item'));
 }