public function test_for_each_works_too() { $d = (new Dictionary('string', 'int'))->add('a', 1)->add('b', 2); $results = []; foreach ($d as $k => $v) { $results[$k] = $v; } $this->assertEquals(["a" => 1, "b" => 2], $results); }