From 617bec761fee283b9c436caf024b3b48375ce104 Mon Sep 17 00:00:00 2001 From: eileen <emcnaughton@wikimedia.org> Date: Tue, 18 Feb 2020 17:26:06 +1300 Subject: [PATCH] Further test fix --- tests/phpunit/api/v3/ContactTest.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/api/v3/ContactTest.php b/tests/phpunit/api/v3/ContactTest.php index d07ebb3c20..aa64a3b529 100644 --- a/tests/phpunit/api/v3/ContactTest.php +++ b/tests/phpunit/api/v3/ContactTest.php @@ -4415,14 +4415,14 @@ class api_v3_ContactTest extends CiviUnitTestCase { ]; $g1ID = $this->smartGroupCreate($ssParams, ['name' => uniqid(), 'title' => uniqid()]); $ssParams = [ - 'formValues' => [ + 'form_values' => [ // Household Member of 'display_relationship_type' => $rtype2['id'] . '_a_b', ], ]; $g2ID = $this->smartGroupCreate($ssParams, ['name' => uniqid(), 'title' => uniqid()]); $ssParams = [ - 'formValues' => [ + 'form_values' => [ // Household Member is 'display_relationship_type' => $rtype2['id'] . '_b_a', ], @@ -4430,12 +4430,9 @@ class api_v3_ContactTest extends CiviUnitTestCase { // the reverse of g2 which adds another layer for overlap at related contact filter $g3ID = $this->smartGroupCreate($ssParams, ['name' => uniqid(), 'title' => uniqid()]); CRM_Contact_BAO_GroupContactCache::loadAll(); - $g1Contacts = $this->callAPISuccess('contact', 'get', ['group' => $g1ID]); - $g2Contacts = $this->callAPISuccess('contact', 'get', ['group' => $g2ID]); - $g3Contacts = $this->callAPISuccess('contact', 'get', ['group' => $g3ID]); - $this->assertTrue($g1Contacts['count'] == 1); - $this->assertTrue($g2Contacts['count'] == 2); - $this->assertTrue($g3Contacts['count'] == 1); + $this->callAPISuccessGetCount('contact', ['group' => $g1ID], 1); + $this->callAPISuccessGetCount('contact', ['group' => $g2ID], 2); + $this->callAPISuccessGetCount('contact', ['group' => $g3ID], 1); } /** -- 2.25.1