/**
* Clean up after the test.
+ *
+ * @throws \CRM_Core_Exception
*/
public function tearDown() {
/**
* Test duplicate contact retrieval with 2 email fields.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testUnsupervisedWithTwoEmailFields() {
$this->setupForGroupDedupe();
* Test that a rule set to is_reserved = 0 works.
*
* There is a different search used dependent on this variable.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testCustomRule() {
$this->setupForGroupDedupe();
/**
* Test a custom rule with a non-default field.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testCustomRuleWithAddress() {
$this->setupForGroupDedupe();
/**
* Test rule from Richard
+ *
+ * @throws \CRM_Core_Exception
*/
public function testRuleThreeContactFieldsEqualWeightWIthThresholdtheTotalSumOfAllWeight() {
$this->setupForGroupDedupe();
]);
}
$foundDupes = CRM_Dedupe_Finder::dupesInGroup($ruleGroup['id'], $this->groupID);
- $this->assertEquals(1, count($foundDupes));
+ $this->assertCount(1, $foundDupes);
}
/**
* Test a custom rule with a non-default field.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testInclusiveRule() {
$this->setupForGroupDedupe();
]);
}
$foundDupes = CRM_Dedupe_Finder::dupesInGroup($ruleGroup['id'], $this->groupID);
- $this->assertEquals(4, count($foundDupes));
+ $this->assertCount(4, $foundDupes);
CRM_Dedupe_Finder::dupes($ruleGroup['id']);
}
/**
* Test dupesByParams function.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testDupesByParams() {
// make dupe checks based on based on following contact sets:
/**
* Set up a group of dedupable contacts.
+ *
+ * @throws \CRM_Core_Exception
*/
protected function setupForGroupDedupe() {
$params = [