Skip to content

Commit

Permalink
Remove campaign pseudoconstants from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Feb 4, 2021
1 parent 83225dc commit dbf668e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 54 deletions.
53 changes: 0 additions & 53 deletions tests/phpunit/CRM/Core/PseudoConstantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ public function testOptionValues() {
];
$result = civicrm_api3('payment_processor', 'create', $api_params);

// Create a Campaign for testing.
$campaign_name = md5(microtime());
$api_params = [
'title' => $campaign_name,
'is_active' => TRUE,
'status_id' => 2,
];
$result = civicrm_api3('campaign', 'create', $api_params);

// Create a membership type for testing.
$membership_type = md5(microtime());
$api_params = [
Expand Down Expand Up @@ -243,10 +234,6 @@ public function testOptionValues() {
'fieldName' => 'medium_id',
'sample' => 'Phone',
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Campaign_DAO_Campaign' => [
[
Expand All @@ -261,21 +248,13 @@ public function testOptionValues() {
],
],
'CRM_Campaign_DAO_Survey' => [
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
[
'fieldName' => 'activity_type_id',
'sample' => 'Phone Call',
'max' => 100,
],
],
'CRM_Campaign_DAO_CampaignGroup' => [
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
[
'fieldName' => 'group_type',
'sample' => 'Include',
Expand Down Expand Up @@ -499,10 +478,6 @@ public function testOptionValues() {
'fieldName' => 'payment_instrument_id',
'sample' => 'Check',
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Pledge_DAO_PledgePayment' => [
[
Expand All @@ -525,10 +500,6 @@ public function testOptionValues() {
'fieldName' => 'frequency_unit',
'sample' => 'month',
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_PCP_DAO_PCP' => [
[
Expand Down Expand Up @@ -778,10 +749,6 @@ public function testOptionValues() {
'sample' => ['USD' => 'US Dollar'],
'max' => 200,
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Event_DAO_Event' => [
[
Expand Down Expand Up @@ -809,10 +776,6 @@ public function testOptionValues() {
'sample' => ['USD' => 'US Dollar'],
'max' => 200,
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Core_DAO_Menu' => [
[
Expand All @@ -833,10 +796,6 @@ public function testOptionValues() {
'fieldName' => 'status_id',
'sample' => 'New',
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Member_DAO_MembershipStatus' => [
[
Expand Down Expand Up @@ -891,10 +850,6 @@ public function testOptionValues() {
'fieldName' => 'visibility',
'sample' => 'Public Pages',
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Mailing_DAO_MailingComponent' => [
[
Expand Down Expand Up @@ -967,10 +922,6 @@ public function testOptionValues() {
'fieldName' => 'contribution_page_id',
'sample' => $contribution_page,
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Contribute_DAO_PremiumsProduct' => [
[
Expand All @@ -992,10 +943,6 @@ public function testOptionValues() {
'sample' => ['USD' => 'US Dollar'],
'max' => 200,
],
[
'fieldName' => 'campaign_id',
'sample' => $campaign_name,
],
],
'CRM_Case_DAO_Case' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Export/BAO/ExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public function testExportPseudoField() {
public function testExportPseudoFieldCampaign() {
$this->setUpContributionExportData();
$campaign = $this->callAPISuccess('Campaign', 'create', ['title' => 'Big campaign and kinda long too']);
$this->callAPISuccess('Contribution', 'create', ['campaign_id' => 'Big_campaign_and_kinda_long_too', 'id' => $this->contributionIDs[0]]);
$this->callAPISuccess('Contribution', 'create', ['campaign_id' => $campaign['id'], 'id' => $this->contributionIDs[0]]);
$selectedFields = [
['contact_type' => 'Individual', 'name' => 'gender_id'],
['contact_type' => 'Contribution', 'name' => 'contribution_campaign_title'],
Expand Down

0 comments on commit dbf668e

Please sign in to comment.