From 281b62a72bc0f976a7b8506cda072caed834dae6 Mon Sep 17 00:00:00 2001 From: Ahed Date: Sat, 6 Feb 2021 13:37:09 +0200 Subject: [PATCH] Fix failing tests after regenerating DAO files --- CRM/Event/BAO/Participant.php | 1 - tests/phpunit/CRM/Contact/BAO/QueryTest.php | 2 +- tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php | 2 +- tests/phpunit/CRM/Event/BAO/QueryTest.php | 4 ++-- tests/phpunit/CRM/Export/BAO/ExportTest.php | 18 +++++++++--------- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 9c726376c9..d287f8fb9d 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -736,7 +736,6 @@ INNER JOIN civicrm_price_field field ON ( value.price_field_id = field.id ], ]; - $participantFields['participant_status_id']['title'] .= ' (ID)'; $participantFields['participant_role_id']['title'] .= ' (ID)'; $discountFields = CRM_Core_DAO_Discount::export(); diff --git a/tests/phpunit/CRM/Contact/BAO/QueryTest.php b/tests/phpunit/CRM/Contact/BAO/QueryTest.php index 19abb8717f..85ded73c22 100644 --- a/tests/phpunit/CRM/Contact/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Contact/BAO/QueryTest.php @@ -474,7 +474,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase { $queryObj = new CRM_Contact_BAO_Query([['activity_campaign_id', '=', '3', 1, 0]]); $this->assertContains('WHERE ( ( civicrm_activity.campaign_id = 3 )', $queryObj->getSearchSQL()); - $this->assertEquals('Campaign = 3', $queryObj->_qill[1][0]); + $this->assertEquals('Campaign ID = 3', $queryObj->_qill[1][0]); $queryObj = new CRM_Contact_BAO_Query([['activity_priority_id', '=', '3', 1, 0]]); $this->assertContains('WHERE ( ( civicrm_activity.priority_id = 3 )', $queryObj->getSearchSQL()); diff --git a/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php b/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php index 9acefc7eea..7d9925d582 100644 --- a/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php +++ b/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php @@ -30,7 +30,7 @@ class CRM_Dedupe_BAO_RuleGroupTest extends CiviUnitTestCase { 'county_id' => 'County', 'geo_code_1' => 'Latitude', 'geo_code_2' => 'Longitude', - 'master_id' => 'Master Address Belongs To', + 'master_id' => 'Master Address ID', 'postal_code' => 'Postal Code', 'postal_code_suffix' => 'Postal Code Suffix', 'state_province_id' => 'State', diff --git a/tests/phpunit/CRM/Event/BAO/QueryTest.php b/tests/phpunit/CRM/Event/BAO/QueryTest.php index bdbc79f8f3..84c31e0eaf 100644 --- a/tests/phpunit/CRM/Event/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Event/BAO/QueryTest.php @@ -117,14 +117,14 @@ class CRM_Event_BAO_QueryTest extends CiviUnitTestCase { [['participant_status_id', '=', 1, 0, 0]], [ 'where' => '( civicrm_participant.status_id = 1 )', - 'qill' => 'Participant Status (ID) = Registered', + 'qill' => 'Status ID = Registered', ], ], [ [['participant_status_id', 'IN', [1, 2], 0, 0]], [ 'where' => '( civicrm_participant.status_id IN ("1", "2") )', - 'qill' => 'Participant Status (ID) In Registered, Attended', + 'qill' => 'Status ID In Registered, Attended', ], ], ]; diff --git a/tests/phpunit/CRM/Export/BAO/ExportTest.php b/tests/phpunit/CRM/Export/BAO/ExportTest.php index fbcc289714..99d699ca6c 100644 --- a/tests/phpunit/CRM/Export/BAO/ExportTest.php +++ b/tests/phpunit/CRM/Export/BAO/ExportTest.php @@ -281,7 +281,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 'Latitude' => '', 'Longitude' => '', 'Address Name' => '', - 'Master Address Belongs To' => '', + 'Master Address ID' => '', 'County' => '', 'State' => '', 'Country' => 'Netherlands', @@ -310,7 +310,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 'Membership ID' => '2', 'Primary Member ID' => '', 'Max Related' => '', - 'Membership Recurring Contribution' => 1, + 'Recurring Contribution ID' => 1, 'Campaign ID' => '', 'Status Override' => '', 'Total Amount' => '200.00', @@ -1050,7 +1050,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 'ids' => [$this->contactIDs[1]], ]); $row = $this->csv->fetchOne(); - $this->assertEquals(CRM_Contact_BAO_Contact::getMasterDisplayName($this->masterAddressID), $row['Home-Master Address Belongs To']); + $this->assertEquals(CRM_Contact_BAO_Contact::getMasterDisplayName($this->masterAddressID), $row['Home-Master Address ID']); } /** @@ -1139,7 +1139,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 'Latitude' => '', 'Longitude' => '', 'Address Name' => '', - 'Master Address Belongs To' => '', + 'Master Address ID' => '', 'County' => '', 'State' => '', 'Country' => 'Netherlands', @@ -2282,7 +2282,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 62 => 'Longitude', 63 => 'Is Manually Geocoded', 64 => 'Address Name', - 65 => 'Master Address Belongs To', + 65 => 'Master Address ID', 66 => 'County', 67 => 'State', 68 => 'Country', @@ -2417,7 +2417,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { */ protected function getParticipantHeaderDefinition() { return [ - 82 => 'Event', + 82 => 'Event ID', 83 => 'Event Title', 84 => 'Event Start Date', 85 => 'Event End Date', @@ -2434,9 +2434,9 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 96 => 'Test', 97 => 'Is Pay Later', 98 => 'Fee Amount', - 99 => 'Discount Name', + 99 => 'Price Set ID', 100 => 'Fee Currency', - 101 => 'Registered By ID', + 101 => 'Registered By Participant ID', 102 => 'Campaign ID', ]; } @@ -2459,7 +2459,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { 90 => 'Membership ID', 91 => 'Primary Member ID', 92 => 'Max Related', - 93 => 'Membership Recurring Contribution', + 93 => 'Recurring Contribution ID', 94 => 'Campaign ID', 95 => 'Status Override', ]; -- 2.25.1