Fix contact page ajax test as no array_column in php5.3
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 14 Sep 2016 21:39:26 +0000 (21:39 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 14 Sep 2016 21:39:26 +0000 (21:39 +0000)
tests/phpunit/CRM/Contact/Page/AjaxTest.php

index 353c6cb423e341827792f9347120f5b244ea63c1..ffba602b73fa8c6c149801e46a84ea0938ebad3f 100644 (file)
@@ -230,7 +230,9 @@ class CRM_Contact_Page_AjaxTest extends CiviUnitTestCase {
       $this->groupContactCreate($groupId);
       $contactIds = array_merge($contactIds, CRM_Contact_BAO_Group::getGroupContacts($groupId));
     }
-    $contactIds = array_column($contactIds, 'contact_id');
+    $contactIds = array_map(function($element) {
+      return $element['contact_id'];
+    }, $contactIds);
 
     // create custom group with contact reference field
     $customGroup = $this->customGroupCreate(array('extends' => 'Contact', 'title' => 'select_test_group'));