From fa52d009ff3adf11293d74e019bd05a5edabc152 Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Thu, 27 Jul 2023 20:13:41 -0600 Subject: [PATCH] Fix saved search test with existing managed saved search --- tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php b/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php index 5277f5a69e..7d196ada74 100644 --- a/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php +++ b/tests/phpunit/CRM/Mailing/Form/Task/AdhocMailingTest.php @@ -44,8 +44,9 @@ class CRM_Mailing_Form_Task_AdhocMailingTest extends CiviUnitTestCase { catch (CRM_Core_Exception_PrematureExitException $e) { // Nothing to see here. } - $savedSearch = $this->callAPISuccessGetSingle('SavedSearch', ['where' => [['has_base', '=', FALSE]]]); - $this->assertEquals($formValues, $savedSearch['form_values']); + $savedSearch = $this->callAPISuccess('SavedSearch', 'get', ['sequential' => 1, 'options' => ['sort' => "id DESC"]]); + $this->assertGreaterThan(0, $savedSearch['count']); + $this->assertEquals($formValues, $savedSearch['values'][0]['form_values']); } } -- 2.25.1