Example #1
0
 public function testAddAllWithSomeValues()
 {
     $arrayList = new Map();
     $arrayList->add(new Pair('key1', 'value1'))->add(new Pair('key2', 'value2'));
     $secoundArrayList = new Map();
     $secoundArrayList->add(new Pair('key3', 'value3'))->add(new Pair('key4', 'value4'));
     $arrayList->addAll($secoundArrayList);
     $this->assertEquals(['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3', 'key4' => 'value4'], $arrayList->toArray());
 }