Ejemplo n.º 1
0
 /**
  * Test function that gets duplicate pairs.
  *
  * It turns out there are 2 code paths retrieving this data so my initial focus is on ensuring
  * they match.
  */
 public function testGetMatchesInGroup()
 {
     $this->setupMatchData();
     $groupID = $this->groupCreate(array('title' => 'she-mice'));
     $this->callAPISuccess('GroupContact', 'create', array('group_id' => $groupID, 'contact_id' => $this->contacts[3]['id']));
     $pairs = CRM_Dedupe_Merger::getDuplicatePairs(1, $groupID, TRUE, 25, FALSE);
     $this->assertEquals(array(0 => array('srcID' => $this->contacts[3]['id'], 'srcName' => 'Mr. Minnie Mouse II', 'dstID' => $this->contacts[2]['id'], 'dstName' => 'Mr. Minnie Mouse II', 'weight' => 20, 'canMerge' => TRUE)), $pairs);
 }