public function testMergeSelf() { $generic = new Dictionary('string', 'string', ['foo' => 'bar']); $generic->merge(new Dictionary('string', 'string', ['baz' => 'foo'])); $this->assertEquals(['foo' => 'bar', 'baz' => 'foo'], $generic->toArray()); }
public function testMergeArrayTwo() { $generic = new Dictionary('string', 'integer'); $this->setExpectedException(InvalidTypeException::class, 'You cannot merge this array, since it contains incompatible types.'); $generic->merge('this cannot work.'); }