public function testConvertions() { $array = ["a" => 1, "b" => 2, "c" => 3, "d" => 3]; $map = new Map($array); $this->assertEquals($array, $map->toStructure()->toArray()); $this->assertEquals([1, 2, 3, 3], $map->toSequence()->toArray()); $this->assertEquals(["a", "b", "c", "d"], $map->toSequence(Map::USE_KEYS)->toArray()); $this->assertEquals([1, 2, 3], $map->toSet()->toArray()); $this->assertEquals(["a", "b", "c", "d"], $map->toSet(Map::USE_KEYS)->toArray()); }