Add in Country and StateProvince APIv4 Entities
[civicrm-core.git] / tests / phpunit / api / v3 / CustomSearchTest.php
index ebf7cc31134d86c524eaf7cc678a84d2f998ce85..4ac288050b1bf3839b3d21d9a1565d3d92535edb 100644 (file)
@@ -14,11 +14,11 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase {
   }
 
   public function testCustomSearch() {
-    $result = $this->callAPISuccess('CustomSearch', 'create', array(
+    $result = $this->callAPISuccess('CustomSearch', 'create', [
       'label' => 'Invalid, overwritten',
       'description' => 'Longish description of the example search form',
       'class_name' => 'CRM_Contact_Form_Search_Custom_Examplez',
-    ));
+    ]);
     $this->assertAPISuccess($result);
     $this->assertEquals(1, $result['count']);
     $entityId = $result['id'];
@@ -31,10 +31,10 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase {
       WHERE name = "CRM_Contact_Form_Search_Custom_Examplez"');
 
     // deactivate
-    $result = $this->callAPISuccess('CustomSearch', 'create', array(
+    $result = $this->callAPISuccess('CustomSearch', 'create', [
       'id' => $entityId,
       'is_active' => 0,
-    ));
+    ]);
 
     $this->assertEquals(1, $result['count']);
     $this->assertDBQuery(1, 'SELECT count(*) FROM civicrm_option_value
@@ -45,10 +45,10 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase {
       WHERE name = "CRM_Contact_Form_Search_Custom_Examplez"');
 
     // activate
-    $result = $this->callAPISuccess('CustomSearch', 'create', array(
+    $result = $this->callAPISuccess('CustomSearch', 'create', [
       'id' => $entityId,
       'is_active' => 1,
-    ));
+    ]);
 
     $this->assertEquals(1, $result['count']);
     $this->assertDBQuery(1, 'SELECT count(*) FROM civicrm_option_value
@@ -57,11 +57,11 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase {
       AND option_group_id IN (SELECT id from civicrm_option_group WHERE name = "custom_search") ');
     $this->assertDBQuery(1, 'SELECT is_active FROM civicrm_option_value
       WHERE name = "CRM_Contact_Form_Search_Custom_Examplez"');
-    $check = $this->callAPISuccess('CustomSearch', 'get', array('id' => $entityId));
+    $check = $this->callAPISuccess('CustomSearch', 'get', ['id' => $entityId]);
     if (!empty($check['count'])) {
-      $result = $this->callAPISuccess('CustomSearch', 'delete', array(
+      $result = $this->callAPISuccess('CustomSearch', 'delete', [
         'id' => $entityId,
-      ));
+      ]);
     }
     $this->assertEquals(1, $result['count']);
     $this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_option_value