Add suffix to sort name
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 1 Dec 2023 03:37:12 +0000 (16:37 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 1 Dec 2023 20:58:26 +0000 (09:58 +1300)
Revives https://github.com/civicrm/civicrm-core/pull/27114

19 files changed:
ext/legacycustomsearches/tests/phpunit/Civi/Searches/GroupTest.php
settings/Core.setting.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php
tests/phpunit/CRM/Activity/Form/ActivityViewTest.php
tests/phpunit/CRM/Activity/Form/SearchTest.php
tests/phpunit/CRM/Contact/BAO/ContactTest.php
tests/phpunit/CRM/Contact/BAO/IndividualTest.php
tests/phpunit/CRM/Contact/BAO/QueryTest.php
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php
tests/phpunit/CRM/Event/BAO/ParticipantTest.php
tests/phpunit/CRM/Export/BAO/ExportTest.php
tests/phpunit/CRM/Financial/Page/AjaxTest.php
tests/phpunit/CRM/Member/BAO/MembershipTest.php
tests/phpunit/CRM/Member/Selector/SearchTest.php
tests/phpunit/CRM/Pledge/Form/SearchTest.php
tests/phpunit/api/v3/ActivityTest.php
tests/phpunit/api/v3/LoggingTest.php
tests/phpunit/api/v3/ReportTemplateTest.php

index 7bff6783516141fe0fb159ce2fd707449c644e17..ed40a2dfe8ead94f3e56a89265197e768e65ec27 100644 (file)
@@ -300,7 +300,7 @@ class GroupTest extends TestCase implements HeadlessInterface, HookInterface, Tr
         $full[] = [
           'contact_id' => $this->ids['Contact'][$id],
           'contact_type' => 'Individual',
-          'sort_name' => 'Contact ' . $id . ', Test',
+          'sort_name' => 'Contact ' . $id . ', Test II',
         ];
       }
     }
index 2864da74d7bac57f6d820c39b93ef6449cbebbd2..9f2177c621fac9ea6a86fd793facf3f94bc9caef 100644 (file)
@@ -155,7 +155,7 @@ return [
     'name' => 'sort_name_format',
     'type' => 'String',
     'html_type' => 'textarea',
-    'default' => '{contact.last_name}{, }{contact.first_name}',
+    'default' => '{contact.last_name}{, }{contact.first_name}{ }{contact.suffix_id:label}',
     'add' => '4.1',
     'title' => ts('Individual Sort Name Format'),
     'is_domain' => 1,
index 47e51e0385d353b452883ace4535d11be22ab4d4..8e48f5ac6c0632bf92b0820a07685a68ebf15912 100644 (file)
@@ -217,7 +217,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
     $activityGetParams += ['contact_id' => $contactId];
     $activities = CRM_Activity_BAO_Activity::getContactActivitySelector($activityGetParams);
     // Assert that we have sensible data to display in the contact tab
-    $this->assertEquals('Anderson, Anthony', $activities['data'][0]['source_contact_name']);
+    $this->assertEquals('Anderson, Anthony II', $activities['data'][0]['source_contact_name']);
     // Note that because there is a target contact but it is not accessible the output is an empty string not n/a
     $this->assertEquals('', $activities['data'][0]['target_contact_name']);
     // verify that doing the underlying query shows we get a target contact_id
@@ -709,9 +709,9 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
     $activities = CRM_Activity_BAO_Activity::getActivities($params);
     //verify target count
     $this->assertEquals($targetCount, $activities[1]['target_contact_count']);
-    $this->assertEquals([$targetContactIDs[0] => 'Anderson, Anthony'], $activities[1]['target_contact_name']);
-    $this->assertEquals('Anderson, Anthony', $activities[1]['source_contact_name']);
-    $this->assertEquals('Anderson, Anthony', $activities[1]['assignee_contact_name'][4]);
+    $this->assertEquals([$targetContactIDs[0] => 'Anderson, Anthony II'], $activities[1]['target_contact_name']);
+    $this->assertEquals('Anderson, Anthony II', $activities[1]['source_contact_name']);
+    $this->assertEquals('Anderson, Anthony II', $activities[1]['assignee_contact_name'][4]);
   }
 
   /**
index ec5eef08e8d01afe45095c731de55b041f7c8f98..5ee3fec3f58fc45e25affc530b1d761c9212f2ac 100644 (file)
@@ -86,9 +86,9 @@ class CRM_Activity_Form_ActivityViewTest extends CiviUnitTestCase {
     $expected = [
       'assignee_contact' => [0 => $activity['target_contact_id']],
       // it's always Julia
-      'assignee_contact_value' => 'Anderson, Julia',
+      'assignee_contact_value' => 'Anderson, Julia II',
       'target_contact' => [0 => $activity['target_contact_id']],
-      'target_contact_value' => 'Anderson, Julia',
+      'target_contact_value' => 'Anderson, Julia II',
       'source_contact' => $activityMoreInfo['source_contact_sort_name'],
       'case_subject' => NULL,
       'id' => $activity['id'],
index 696068edd83fe1cb0755d9909b18313092c18f5d..4b9d7fb96ae79b34635f5f82b74a0f1b7cbacfe6 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Activity_Form_SearchTest extends CiviUnitTestCase {
       [
         'contact_id' => '3',
         'contact_type' => '<a href="/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3" data-tooltip-url="/index.php?q=civicrm/profile/view&amp;reset=1&amp;gid=7&amp;id=3&amp;snippet=4&amp;is_show_email_task=1" class="crm-summary-link"><i class="crm-i fa-fw fa-user" title=""></i></a>',
-        'sort_name' => 'Anderson, Anthony',
+        'sort_name' => 'Anderson, Anthony II',
         'display_name' => 'Mr. Anthony Anderson II',
         'activity_id' => '1',
         'activity_date_time' => '2017-01-30 00:00:00',
@@ -61,7 +61,7 @@ class CRM_Activity_Form_SearchTest extends CiviUnitTestCase {
         'target_contact_name' => [],
         'assignee_contact_name' => [],
         'source_contact_id' => '3',
-        'source_contact_name' => 'Anderson, Anthony',
+        'source_contact_name' => 'Anderson, Anthony II',
         'checkbox' => 'mark_x_1',
         'mailingId' => '',
         'action' => '<span><a href="/index.php?q=civicrm/contact/view/contribution&amp;action=view&amp;reset=1&amp;id=1&amp;cid=3&amp;context=search&amp;searchContext=activity&amp;key=' . $qfKey . '" class="action-item crm-hover-button" title=\'View Activity\' >View</a></span>',
index a30e4365a5ed53c2b4a81c4e28995bb3019c675a..4883d2366218989c2cbad8bc29447333f5512c7a 100644 (file)
@@ -91,7 +91,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
     $this->assertEquals('1', $contact->do_not_trade, 'Check for do_not_trade creation.');
     $this->assertEquals('1', $contact->is_opt_out, 'Check for is_opt_out creation.');
     $this->assertEquals($params['external_identifier'], $contact->external_identifier, 'Check for external_identifier creation.');
-    $this->assertEquals($params['last_name'] . ', ' . $params['first_name'], $contact->sort_name, 'Check for sort_name creation.');
+    $this->assertEquals($params['last_name'] . ', ' . $params['first_name'] . ' Sr.', $contact->sort_name, 'Check for sort_name creation.');
 
     $this->assertEquals($params['contact_source'], $contact->source, 'Check for contact_source creation.');
     $this->assertEquals($params['prefix_id'], $contact->prefix_id, 'Check for prefix_id creation.');
index 0928bfda59cc1b14cc03fc9bad24922e72348977..8027aee25d6feed6e1f4b5a200328dc66dc7b719 100644 (file)
@@ -45,14 +45,14 @@ class CRM_Contact_BAO_IndividualTest extends CiviUnitTestCase {
     $contact = new CRM_Contact_DAO_Contact();
     CRM_Contact_BAO_Individual::format($params, $contact);
     $this->assertEquals('Mr. Ben Lee Jr.', $contact->display_name);
-    $this->assertEquals('Lee, Ben', $contact->sort_name);
+    $this->assertEquals('Lee, Ben Jr.', $contact->sort_name);
 
     // Check with legacy tokens too.
     \Civi::settings()->set('display_name_format', '{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}');
     $contact = new CRM_Contact_DAO_Contact();
     CRM_Contact_BAO_Individual::format($params, $contact);
     $this->assertEquals('Mr. Ben Lee Jr.', $contact->display_name);
-    $this->assertEquals('Lee, Ben', $contact->sort_name);
+    $this->assertEquals('Lee, Ben Jr.', $contact->sort_name);
   }
 
   /**
index a7c3835394b0565902c5bbe9d899c530807e9ed5..e5a868fbacaec7f8762c32e08e4eef7bbf1db990 100644 (file)
@@ -561,7 +561,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
       [$select, $from, $where, $having] = $queryObj->query();
       $dao = CRM_Core_DAO::executeQuery("$select $from $where $having");
       $dao->fetch();
-      $this->assertEquals('Anderson, Anthony', $dao->sort_name);
+      $this->assertEquals('Anderson, Anthony II', $dao->sort_name);
     }
     catch (PEAR_Exception $e) {
       $err = $e->getCause();
index 664d0855b371956c8429a6891ea09d1657198f2d..9036857b4a6a4c64de9f10a90eea0c3920d29363 100644 (file)
@@ -331,7 +331,7 @@ class CRM_Contribute_BAO_ContributionTest extends CiviUnitTestCase {
 
     $contributionID = $this->callAPISuccess('Contribution', 'create', $param)['id'];
     // Display sort name during Update multiple contributions.
-    $this->assertEquals('Watson, Shane', CRM_Contribute_BAO_Contribution::sortName($contributionID));
+    $this->assertEquals('Watson, Shane II', CRM_Contribute_BAO_Contribution::sortName($contributionID));
   }
 
   /**
index 8b51e6f0eb2c22b4ff8ffec25493000e20e0b306..88ad55b1d5b10a1f3da1af35872beb110ac74218 100644 (file)
@@ -879,7 +879,7 @@ emo
       'do_not_trade' => 1,
       'is_opt_out' => 1,
       'external_identifier' => 'blah',
-      'sort_name' => 'Smith, Robert',
+      'sort_name' => 'Smith, Robert II',
       'display_name' => 'Robert Smith',
       'nick_name' => 'Bob',
       'image_URL' => 'https://example.com',
@@ -1071,7 +1071,7 @@ do_not_sms:1
 do_not_trade:1
 is_opt_out:1
 external_identifier:blah
-sort_name:Smith, Robert
+sort_name:Smith, Robert II
 display_name:Mr. Robert Smith II
 nick_name:Bob
 image_URL:https://example.com
@@ -1170,7 +1170,7 @@ do_not_sms:label |Yes
 do_not_trade:label |Yes
 is_opt_out:label |Yes
 external_identifier |blah
-sort_name |Smith, Robert
+sort_name |Smith, Robert II
 display_name |Mr. Robert Smith II
 nick_name |Bob
 image_URL |https://example.com
index b2d6a98ea63dbc32ab582d794469e281115fcbce..685fe9efb13d4bdb56147467a6f2c4b66455a84c 100644 (file)
@@ -166,7 +166,7 @@ class CRM_Event_BAO_ParticipantTest extends CiviUnitTestCase {
    */
   public function testParticipantDetails(): void {
     $participant = $this->callAPISuccess('Participant', 'create', ['contact_id' => $this->ids['Contact']['individual_0'], 'event_id' => $this->getEventID()]);
-    $params = ['name' => 'Anderson, Anthony', 'title' => 'Annual CiviCRM meet'];
+    $params = ['name' => 'Anderson, Anthony II', 'title' => 'Annual CiviCRM meet'];
 
     $participantDetails = CRM_Event_BAO_Participant::participantDetails($participant['id']);
 
index ab50d1671475709adc8428f21d7b1aacc0cf1169..c5deaaedd039be0d1e3ce7648bc47cbc690b2f54 100644 (file)
@@ -192,7 +192,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
     $row = $this->csv->fetchOne(1);
     $this->assertEquals(95, $row['Net Amount']);
     $this->assertEquals(5, $row['Soft Credit Amount']);
-    $this->assertEquals('Anderson, Anthony', $row['Soft Credit For']);
+    $this->assertEquals('Anderson, Anthony II', $row['Soft Credit For']);
     $this->assertEquals($this->contributionIDs[0], $row['Soft Credit For Contribution ID']);
 
     // Ideally we would use a randomised temp table name & use generic temp cleanup for cleanup - but
@@ -230,7 +230,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'No Bulk Emails (User Opt Out)' => '',
       'Legal Identifier' => '',
       'External Identifier' => '',
-      'Sort Name' => 'Anderson, Anthony',
+      'Sort Name' => 'Anderson, Anthony II',
       'Display Name' => 'Mr. Anthony Anderson II',
       'Nickname' => '',
       'Legal Name' => '',
@@ -1082,7 +1082,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
       'No Bulk Emails (User Opt Out)' => '',
       'Legal Identifier' => '',
       'External Identifier' => '',
-      'Sort Name' => 'Anderson, Anthony',
+      'Sort Name' => 'Anderson, Anthony II',
       'Display Name' => 'Mr. Anthony Anderson II',
       'Nickname' => '',
       'Legal Name' => '',
index b3d1801496ba1dd88d656535907fd1482821830a..2cf77684a73b4f90e94afc9d0fe228c2ba3197cd 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Financial_Page_AjaxTest extends CiviUnitTestCase {
     $json = CRM_Financial_Page_AJAX::getFinancialTransactionsList();
     $json = str_replace(rtrim(CIVICRM_UF_BASEURL, '/'), 'http://FIX ME', $json);
     $this->assertEquals('{"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["","<a href=\"/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3\" data-tooltip-url=\"/index.php?q=civicrm/profile/view&amp;reset=1&amp;gid=7&amp;id=3&amp;snippet=4&amp;is_show_email_task=1\" class=\"crm-summary-link\">'
-    . '<i class=\"crm-i fa-fw fa-user\" title=\"\"></i></a>","<a href=/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3>Anderson, Anthony</a>","$100.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",'
+    . '<i class=\"crm-i fa-fw fa-user\" title=\"\"></i></a>","<a href=/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3>Anderson, Anthony II</a>","$100.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",'
     . '"Credit Card","Completed","Donation","<span><a href=\"/index.php?q=civicrm/contact/view/contribution&amp;reset=1&amp;id=1&amp;cid=3&amp;action=view&amp;context=contribution&amp;'
     . 'selectedChild=contribute\" class=\"action-item crm-hover-button\" title=\'View Contribution\' >View</a></span>"]] }', $json);
   }
@@ -67,7 +67,7 @@ class CRM_Financial_Page_AjaxTest extends CiviUnitTestCase {
     $json = CRM_Financial_Page_AJAX::getFinancialTransactionsList();
     $json = str_replace(rtrim(CIVICRM_UF_BASEURL, '/'), 'http://FIX ME', $json);
     $this->assertEquals('{"sEcho": 1, "iTotalRecords": 1, "iTotalDisplayRecords": 1, "aaData": [ ["<input type=\'checkbox\' id=\'mark_x_2\' name=\'mark_x_2\' value=\'1\' onclick=enableActions(\'x\')></input>","<a href=\"/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3\" data-tooltip-url=\"/index.php?q=civicrm/profile/view&amp;reset=1&amp;gid=7&amp;id=3&amp;snippet=4&amp;is_show_email_task=1\" class=\"crm-summary-link\">'
-    . '<i class=\"crm-i fa-fw fa-user\" title=\"\"></i></a>","<a href=/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3>Anderson, Anthony</a>","$5.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",'
+    . '<i class=\"crm-i fa-fw fa-user\" title=\"\"></i></a>","<a href=/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3>Anderson, Anthony II</a>","$5.00","12345","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM","' . CRM_Utils_Date::customFormat(date('Ymd')) . ' 12:00 AM",'
     . '"Credit Card","Completed","Donation","<span><a href=\"/index.php?q=civicrm/contact/view/contribution&amp;reset=1&amp;id=1&amp;cid=3&amp;action=view&amp;context=contribution&amp;'
     . 'selectedChild=contribute\" class=\"action-item crm-hover-button\" title=\'View Contribution\' >View</a><a href=\"#\" class=\"action-item crm-hover-button disable-action\" title=\'Assign Transaction\' onclick = \"assignRemove( 2,\'assign\' );\">Assign</a></span>"]] }', $json);
   }
index 67cfe4388f1c4dad58d31c0fc2b0ddc2846142e1..353c5d7a677fb06c9aad8ea5303a1b89105c938b 100644 (file)
@@ -443,7 +443,7 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
 
     $membership = $this->callAPISuccess('Membership', 'create', $params);
 
-    $this->assertEquals('Anderson, Anthony', CRM_Member_BAO_Membership::sortName($membership['id']));
+    $this->assertEquals('Anderson, Anthony II', CRM_Member_BAO_Membership::sortName($membership['id']));
 
     $this->membershipDelete($membership['id']);
     $this->contactDelete($contactId);
index b53381b218375e80315edd1e846b891b6873e87a..31117da0aa61071b441b3f3b113e2c4bdfeb0094 100644 (file)
@@ -32,7 +32,7 @@ class CRM_Member_Selector_SearchTest extends CiviUnitTestCase {
       'contact_id' => $contactID,
       'membership_id' => $membershipID,
       'contact_type' => '<a href="/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=' . $contactID . '" data-tooltip-url="/index.php?q=civicrm/profile/view&amp;reset=1&amp;gid=7&amp;id=' . $contactID . '&amp;snippet=4&amp;is_show_email_task=1" class="crm-summary-link"><i class="crm-i fa-fw fa-user" title=""></i></a>',
-      'sort_name' => 'Anderson, Anthony',
+      'sort_name' => 'Anderson, Anthony II',
       'membership_type' => 'General',
       'membership_join_date' => date('Y-m-d'),
       'membership_start_date' => date('Y-m-d'),
index 614860e56f7e32019e42552d4063fe9acd0db123..ff5e0bea73bf4c68181abf497327fc24acdf7fb1 100644 (file)
@@ -35,7 +35,7 @@ class CRM_Pledge_Form_SearchTest extends CiviUnitTestCase {
     $rows = $form->controller->get('rows');
     $this->assertEquals([
       'contact_id' => '3',
-      'sort_name' => 'Anderson, Anthony',
+      'sort_name' => 'Anderson, Anthony II',
       'display_name' => 'Mr. Anthony Anderson II',
       'pledge_id' => '1',
       'pledge_amount' => 100.00,
index 3de379cc7bf083dce1e12d1dab17c34d9bc561d8..9c977dd715e698540032000817a9973b8f054955 100644 (file)
@@ -517,10 +517,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'id' => $result['id'],
     ]);
 
-    $this->assertEquals('Anderson, Anthony', $result['values'][$result['id']]['custom_' . $customField['id']]);
-    $this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . "_id"], ' in line ' . __LINE__);
-    $this->assertEquals('Anderson, Anthony', $result['values'][$result['id']]['custom_' . $customField['id'] . '_1'], ' in line ' . __LINE__);
-    $this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . "_1_id"], ' in line ' . __LINE__);
+    $this->assertEquals('Anderson, Anthony II', $result['values'][$result['id']]['custom_' . $customField['id']]);
+    $this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . '_id']);
+    $this->assertEquals('Anderson, Anthony II', $result['values'][$result['id']]['custom_' . $customField['id'] . '_1']);
+    $this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . '_1_id']);
     $this->customFieldDelete($ids['custom_field_id']);
     $this->customGroupDelete($ids['custom_group_id']);
   }
index 6dfadcfbd1e1af4c058f222a209de61b9c80adbe..d96cef7c70fbb9002e7535425c9e90bc4eda227b 100644 (file)
@@ -401,6 +401,8 @@ class api_v3_LoggingTest extends CiviUnitTestCase {
 
   /**
    * Test changes can be retrieved.
+   *
+   * @throws \CRM_Core_Exception
    */
   public function testGet(): void {
     $contactId = $this->individualCreate();
@@ -417,13 +419,15 @@ class api_v3_LoggingTest extends CiviUnitTestCase {
     ]);
     $this->callAPISuccessGetSingle('email', ['email' => 'dopey@mail.com']);
     $diffs = $this->callAPISuccess('Logging', 'get', ['log_conn_id' => 'wooty woot', 'log_date' => $timeStamp], __FUNCTION__, __FILE__);
-    $this->assertLoggingIncludes($diffs['values'], ['to' => 'Dwarf, Dopey']);
+    $this->assertLoggingIncludes($diffs['values'], ['to' => 'Dwarf, Dopey II']);
     $this->assertLoggingIncludes($diffs['values'], ['to' => 'Mr. Dopey Dwarf II', 'table' => 'civicrm_contact', 'action' => 'Update', 'field' => 'display_name']);
     $this->assertLoggingIncludes($diffs['values'], ['to' => 'dopey@mail.com', 'table' => 'civicrm_email', 'action' => 'Insert', 'field' => 'email']);
   }
 
   /**
    * Test changes can be retrieved without log_date being required.
+   *
+   * @throws \CRM_Core_Exception
    */
   public function testGetNoDate(): void {
     $contactId = $this->individualCreate();
@@ -440,7 +444,7 @@ class api_v3_LoggingTest extends CiviUnitTestCase {
     ]);
     $this->callAPISuccessGetSingle('email', ['email' => 'dopey@mail.com']);
     $diffs = $this->callAPISuccess('Logging', 'get', ['log_conn_id' => 'wooty wop wop']);
-    $this->assertLoggingIncludes($diffs['values'], ['to' => 'Dwarf, Dopey']);
+    $this->assertLoggingIncludes($diffs['values'], ['to' => 'Dwarf, Dopey II']);
     $this->assertLoggingIncludes($diffs['values'], ['to' => 'Mr. Dopey Dwarf II', 'table' => 'civicrm_contact', 'action' => 'Update', 'field' => 'display_name']);
     $this->assertLoggingIncludes($diffs['values'], ['to' => 'dopey@mail.com', 'table' => 'civicrm_email', 'action' => 'Insert', 'field' => 'email']);
   }
index de4bf35df653e2716dfb04a31783d7bf5debae54..487380e8c8eab027de5b1b888c5b4dcd75733bb7 100644 (file)
@@ -602,7 +602,7 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase {
       'options' => ['metadata' => ['sql']],
     ]);
     $this->assertEquals(
-      "<a href='/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=" . $contactID2 . "'>Anderson, Anthony</a> $ 5.00",
+      "<a href='/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=" . $contactID2 . "'>Anderson, Anthony II</a> $ 5.00",
       $rows['values'][0]['civicrm_contribution_soft_credits']
     );
   }
@@ -1209,9 +1209,9 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase {
 
     $rows = $this->callAPISuccess('report_template', 'getrows', $params)['values'];
     $expected = [
-      'civicrm_contact_contact_source' => 'Łąchowski-Roberts, Anthony',
-      'civicrm_contact_contact_assignee' => '<a title=\'View Contact Summary for this Contact\' href=\'/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=4\'>Łąchowski-Roberts, Anthony</a>',
-      'civicrm_contact_contact_target' => '<a title=\'View Contact Summary for this Contact\' href=\'/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3\'>Brzęczysław, Anthony</a>; <a title=\'View Contact Summary for this Contact\' href=\'/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=4\'>Łąchowski-Roberts, Anthony</a>',
+      'civicrm_contact_contact_source' => 'Łąchowski-Roberts, Anthony II',
+      'civicrm_contact_contact_assignee' => '<a title=\'View Contact Summary for this Contact\' href=\'/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=4\'>Łąchowski-Roberts, Anthony II</a>',
+      'civicrm_contact_contact_target' => '<a title=\'View Contact Summary for this Contact\' href=\'/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=3\'>Brzęczysław, Anthony II</a>; <a title=\'View Contact Summary for this Contact\' href=\'/index.php?q=civicrm/contact/view&amp;reset=1&amp;cid=4\'>Łąchowski-Roberts, Anthony II</a>',
       'civicrm_contact_contact_source_id' => $this->contactIDs[2],
       'civicrm_contact_contact_assignee_id' => $this->contactIDs[1],
       'civicrm_contact_contact_target_id' => $this->contactIDs[0] . ';' . $this->contactIDs[1],