Collections\Tests\Dictionary\MergeTest::test_can_merge_array PHP Method

test_can_merge_array() public method

    public function test_can_merge_array()
    {
        $l = (new Dictionary('string', 'int'))->add('a', 1);
        $r = ["b" => 2];
        $m = $l->merge($r);
        $this->assertEquals(2, $m->count());
        $this->assertEquals(1, $m->get('a'));
        $this->assertEquals(2, $m->get('b'));
    }