CRM Test Fixes
authorjitendrapurohit <jitendra.purohit@webaccess.co.in>
Wed, 19 Mar 2014 14:02:13 +0000 (19:32 +0530)
committerjitendrapurohit <jitendra.purohit@webaccess.co.in>
Wed, 19 Mar 2014 14:02:13 +0000 (19:32 +0530)
tests/phpunit/CRM/Contact/BAO/ContactTest.php
tests/phpunit/CRM/Core/BAO/CustomFieldTest.php
tests/phpunit/CRM/Core/PseudoConstantTest.php
tests/phpunit/CRM/Utils/Migrate/fixtures/Activity-text.xml
tests/phpunit/CRM/Utils/Migrate/fixtures/ActivityMeeting-text.xml
tests/phpunit/CRM/Utils/Migrate/fixtures/Contact-select.xml
tests/phpunit/CRM/Utils/Migrate/fixtures/Contact-text.xml
tests/phpunit/CRM/Utils/Migrate/fixtures/Individual-text.xml
tests/phpunit/CRM/Utils/Migrate/fixtures/IndividualStudent-text.xml

index d4aa8b917f90ca6ef2c7186b157e3d97fdc16514..99f79ecbb05d2756c87224f6063c494c022e6179 100644 (file)
@@ -546,7 +546,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
     //take the common contact params
     $params = $this->contactParams();
     $params['note'] = 'test note';
-    $params['create_employer'] = 'Yahoo';
+    $params['create_employer'] = 1;
 
     //create the contact with given params.
     $contact = CRM_Contact_BAO_Contact::create($params);
@@ -615,7 +615,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
     $this->assertEquals(1, $values['relationship']['totalCount'], 'Check for total relationship count');
     foreach ($values['relationship']['data'] as $key => $val) {
       //Now check values of Relationship organization.
-      $this->assertEquals($params['create_employer'], $val['name'], 'Check for organization');
+      $this->assertEquals($params['create_employer'], $val['id'], 'Check for organization');
       //Now check values of Relationship type.
       $this->assertEquals('Employee of', $val['relation'], 'Check for relationship type');
       //delete the organization.
index 40519893f1a11f30dabc90bf4c8beca30b2483c2..d375fb18382316ac912ebf1fe18a707974fb9112 100644 (file)
@@ -155,8 +155,8 @@ class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase {
     $fields = array(
       'groupId' => $customGroup->id,
       'label' => 'Throwaway Field',
-      'data_type' => 'Memo',
-      'html_type' => 'TextArea',
+      'dataType' => 'Memo',
+      'htmlType' => 'TextArea',
     );
 
     $customField = Custom::createField(array(), $fields);
index 28c2014bf5dc718d4cbbdb385f98d8a309fcce44..52506ee3da2d67a5520d10cd1c0b16d0dac704ca 100644 (file)
@@ -277,6 +277,10 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'sample' => array('USD' => 'US Dollar'),
           'max' => 200,
         ),
+        array(
+          'fieldName' => 'soft_credit_type_id',
+          'sample' => 'In Honor of',
+        ),
       ),
       'CRM_Contribute_DAO_Product' => array(
         array(
@@ -348,12 +352,6 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'max' => 15,
         ),
       ),
-      'CRM_Pledge_DAO_Pledge' => array(
-        array(
-          'fieldName' => 'honor_type_id',
-          'sample' => 'In Honor of',
-        ),
-      ),
       'CRM_Core_DAO_Phone' => array(
         array(
           'fieldName' => 'phone_type_id',
@@ -529,10 +527,6 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'fieldName' => 'contribution_status_id',
           'sample' => 'Completed',
         ),
-        array(
-          'fieldName' => 'honor_type_id',
-          'sample' => 'In Honor of',
-        ),
       ),
       'CRM_Contribute_DAO_ContributionPage' => array(
         array(
index d5efc4e231ada2e712dd24751885927c3fe30c0e..3ba60791f7a0b5aad5273808e646f2fa5415591b 100644 (file)
@@ -32,6 +32,7 @@
       <is_active>1</is_active>
       <is_view>0</is_view>
       <column_name>name1_1</column_name>
+      <in_selector>0</in_selector>
       <custom_group_name>example</custom_group_name>
     </CustomField>
   </CustomFields>
index f32c3c117fade6a61bbb5407bc7d1b0c4e446051..506cc451dc5534be7f084b0443483fa34111a6e2 100644 (file)
@@ -34,6 +34,7 @@
       <is_active>1</is_active>
       <is_view>0</is_view>
       <column_name>name1_1</column_name>
+      <in_selector>0</in_selector>
       <custom_group_name>example</custom_group_name>
     </CustomField>
   </CustomFields>
index 621e338d881e0ae63f80cdacd7ab45de31d4b1d9..ba6a2165a61e3a50e1c22d8b3b09ba8e7a9426e8 100644 (file)
@@ -31,6 +31,7 @@
       <is_active>1</is_active>
       <is_view>0</is_view>
       <column_name>our_select_field_1</column_name>
+      <in_selector>0</in_selector>
       <option_group_name>our_select_field_20130818044104</option_group_name>
       <custom_group_name>example</custom_group_name>
     </CustomField>
index f78472ff52d24da32a33b1d886e4730b49533e30..cedc6e16e6d50fd971bb3f6023bf5d3cacbe3269 100644 (file)
@@ -32,6 +32,7 @@
       <is_active>1</is_active>
       <is_view>0</is_view>
       <column_name>name1_1</column_name>
+      <in_selector>0</in_selector>
       <custom_group_name>example</custom_group_name>
     </CustomField>
   </CustomFields>
index e656f28c47912fdc6c3ed6a59cb8e6bfa94061a2..7903a78575bb0327b939591efa7041fd8a3da9f8 100644 (file)
@@ -32,6 +32,7 @@
       <is_active>1</is_active>
       <is_view>0</is_view>
       <column_name>name1_1</column_name>
+      <in_selector>0</in_selector>
       <custom_group_name>example</custom_group_name>
     </CustomField>
   </CustomFields>
index 0a4c15807c94319e67a178f5625aeeb2f925dc2e..64b60b799ccdb563910cbb8733fe0573ba80f598 100644 (file)
@@ -34,6 +34,7 @@
       <is_active>1</is_active>
       <is_view>0</is_view>
       <column_name>name1_1</column_name>
+      <in_selector>0</in_selector>
       <custom_group_name>example</custom_group_name>
     </CustomField>
   </CustomFields>