From 241ee7676cc80bc25f8665c5f78b4351868af48f Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 2 Dec 2019 10:52:46 +1100 Subject: [PATCH] Add in unit test demonstrating the regression where smart group fails to load if a custom field has been deleted which was stored in the form values array --- tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php index 28ea51967f..cbb319d782 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php @@ -96,6 +96,9 @@ class CRM_Contact_BAO_SavedSearchTest extends CiviUnitTestCase { $defaults = $sg->setDefaultValues(); $this->checkArrayEquals($defaults, $formValues); + $this->callAPISuccess('CustomField', 'delete', ['id' => $this->ids['CustomField']['int']]); + $defaults = $sg->setDefaultValues(); + print_r($defaults); } /** -- 2.25.1