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

test_can_merge_dict() public method

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