public function testLinkTo() { $map = new \Bonder\Collections\Map(); $map->set('3', 'three'); $this->assertTrue($map->containsKey('3')); $array = array('7' => 'seven', '19' => 'nineteen', '31' => 'thirty-one'); $map->linkTo($array); $this->assertFalse($map->containsKey('3')); $this->assertEquals(3, $map->size()); $map->remove('31'); $this->assertEquals(2, $map->size()); unset($array['19']); $this->assertEquals(1, $map->size()); $this->assertTrue($map->isLinkedTo($array)); }