From ff85b03ea3a56e068c8d8efdc61dc41e38b10168 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Fri, 17 Sep 2021 13:59:51 +0100 Subject: [PATCH] Fix smart group cache clear test so group we're clearing is actually a smart group --- tests/phpunit/api/v3/ContactTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/api/v3/ContactTest.php b/tests/phpunit/api/v3/ContactTest.php index 6eb0b08624..a8d226c345 100644 --- a/tests/phpunit/api/v3/ContactTest.php +++ b/tests/phpunit/api/v3/ContactTest.php @@ -146,9 +146,11 @@ class api_v3_ContactTest extends CiviUnitTestCase { * @throws \CRM_Core_Exception */ public function testCreateIndividualNoCacheClear(): void { - $contact = $this->callAPISuccess('contact', 'create', $this->_params); - $groupID = $this->groupCreate(); + + $smartGroupParams = ['form_values' => ['contact_type' => ['IN' => ['Household']]]]; + $savedSearch = CRM_Contact_BAO_SavedSearch::create($smartGroupParams); + $groupID = $this->groupCreate(['saved_search_id' => $savedSearch->id]); $this->putGroupContactCacheInClearableState($groupID, $contact); -- 2.25.1