Merge pull request #11642 from JKingsnorth/CRM-21739
[civicrm-core.git] / tests / phpunit / api / v3 / JobTestCustomDataTest.php
index 8b062156aaed77d7bf0c5ec389010268f0aeeb5c..d28f9e1f7820ea4ca00aeeec1039f2c2abf43451 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -31,7 +31,7 @@
  * @package CiviCRM_APIv3
  * @subpackage API_Job
  *
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2018
  * @version $Id: Job.php 30879 2010-11-22 15:45:55Z shot $
  *
  */
@@ -240,7 +240,8 @@ class api_v3_JobTestCustomDataTest extends CiviUnitTestCase {
    */
   public function testBatchMergeDateCustomFieldHandlingIsView() {
     $this->customFieldCreate(array(
-      'id' => $this->customFieldID,
+      'label' => 'OnlyView',
+      'custom_group_id' => $this->customGroupID,
       'is_view' => 1,
     ));
     $customFieldLabel = 'custom_' . $this->customFieldID;
@@ -249,7 +250,7 @@ class api_v3_JobTestCustomDataTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('Job', 'process_batch_merge', array());
     $this->assertEquals(1, count($result['values']['merged']));
     $contact = $this->callAPISuccess('Contact', 'getsingle', array('id' => $contactID, 'return' => $customFieldLabel));
-    $this->assertEquals('2012-11-03', $contact[$customFieldLabel]);
+    $this->assertEquals('2012-11-03 00:00:00', $contact[$customFieldLabel]);
   }
 
   /**