X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fapi%2Fv3%2FCustomSearchTest.php;h=fe190a1924b1670f42767b188528bd1d77467f79;hb=42bf93368ea81b2fa70fab038f3c884755e1ab88;hp=db49192c385812ecf02782b12f033dfecc518eef;hpb=a85fdac06e385698ff86f7b6fa06766f58de1a21;p=civicrm-core.git diff --git a/tests/phpunit/api/v3/CustomSearchTest.php b/tests/phpunit/api/v3/CustomSearchTest.php index db49192c38..fe190a1924 100644 --- a/tests/phpunit/api/v3/CustomSearchTest.php +++ b/tests/phpunit/api/v3/CustomSearchTest.php @@ -2,6 +2,9 @@ require_once 'CiviTest/CiviUnitTestCase.php'; +/** + * Class api_v3_CustomSearchTest + */ class api_v3_CustomSearchTest extends CiviUnitTestCase { protected $_apiversion; @@ -25,7 +28,7 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase { $this->assertDBQuery(1, 'SELECT count(*) FROM civicrm_option_value WHERE name = "CRM_Contact_Form_Search_Custom_Examplez" AND label = "CRM_Contact_Form_Search_Custom_Examplez" - AND option_group_id = 25'); + 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"'); @@ -39,7 +42,7 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase { $this->assertDBQuery(1, 'SELECT count(*) FROM civicrm_option_value WHERE name = "CRM_Contact_Form_Search_Custom_Examplez" AND label = "CRM_Contact_Form_Search_Custom_Examplez" - AND option_group_id = 25'); + AND option_group_id IN (SELECT id from civicrm_option_group WHERE name = "custom_search") '); $this->assertDBQuery(0, 'SELECT is_active FROM civicrm_option_value WHERE name = "CRM_Contact_Form_Search_Custom_Examplez"'); @@ -53,7 +56,7 @@ class api_v3_CustomSearchTest extends CiviUnitTestCase { $this->assertDBQuery(1, 'SELECT count(*) FROM civicrm_option_value WHERE name = "CRM_Contact_Form_Search_Custom_Examplez" AND label = "CRM_Contact_Form_Search_Custom_Examplez" - AND option_group_id = 25'); + 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"');