$contactID = self::getContactID($subParam['email'],
$subParam['name'],
- $createContact,
- $mail
+ $createContact
);
$subParam['id'] = $contactID ?: NULL;
}
* @param string $email
* @param string $name
* @param bool $create
- * @param string $mail
+ *
+ * @internal core use only (only use outside this class is in core unit tests).
*
* @return int|null
*/
- public static function getContactID($email, $name, $create, &$mail) {
+ public static function getContactID($email, $name, $create) {
$dao = CRM_Contact_BAO_Contact::matchContactOnEmail($email, 'Individual');
$contactID = NULL;
public function testEmailUseExistentIndividualContact(): void {
$expectedContactId = $this->individualCreate(['email' => $this->email]);
- $receivedContactId = CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE, $mail);
+ $receivedContactId = CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE);
$this->assertEquals($expectedContactId, $receivedContactId);
}
$contact = CRM_Contact_BAO_Contact::matchContactOnEmail($this->email, 'Individual');
$this->assertNull($contact);
- CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE, $mail);
+ CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE);
$contact = CRM_Contact_BAO_Contact::matchContactOnEmail($this->email, 'Individual');
$this->assertNotNull($contact);
public function testEmailUseExistentOrganizationContact(): void {
$expectedContactId = $this->organizationCreate(['email' => $this->email]);
- $receivedContactId = CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE, $mail);
+ $receivedContactId = CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE);
$this->assertEquals($expectedContactId, $receivedContactId);
}
$individualContactId = $this->individualCreate(['email' => $this->email]);
$this->organizationCreate(['email' => $this->email]);
- $receivedContactId = CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE, $mail);
+ $receivedContactId = CRM_Utils_Mail_Incoming::getContactID($this->email, $this->name, TRUE);
$this->assertEquals($individualContactId, $receivedContactId);
}