public function testMap() { $this->properties->map(function ($key, $item) { return "mapped_" . $item; }); $this->assertEquals(['foo1' => 'mapped_bar1', 'foo2' => 'mapped_bar2'], $this->properties->toArray()); }
/** @dataProvider provides_valid_collection */ public function test_toArray($collection, array $array) { $c = new Map($collection); $this->assertSame($array, $c->toArray()); }