From f5be1f3a1ea31a5a26e58007c63426d364e01300 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 8 Oct 2020 06:58:03 +1100 Subject: [PATCH] [NFC] dev/core#2053 Extend nextedGroup test to show that it will return child groups that are Mailing groups even when the parent isn't a mailing group --- tests/phpunit/CRM/Contact/BAO/GroupTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Contact/BAO/GroupTest.php b/tests/phpunit/CRM/Contact/BAO/GroupTest.php index 1b50f79b52..3fde423765 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupTest.php @@ -142,6 +142,7 @@ class CRM_Contact_BAO_GroupTest extends CiviUnitTestCase { 'parents' => [ $group2->id => 1, ], + 'group_type' => ['2' => 1], ]; $group3 = CRM_Contact_BAO_Group::create($params); @@ -155,7 +156,10 @@ class CRM_Contact_BAO_GroupTest extends CiviUnitTestCase { // Check restrict to mailing groups $nestedGroup = CRM_Core_PseudoConstant::nestedGroup(TRUE, 'Mailing'); - $this->assertSame([$group1->id => 'Parent Group A'], $nestedGroup); + $this->assertSame([ + $group1->id => 'Parent Group A', + $group3->id => '  Child Group C', + ], $nestedGroup); } /** -- 2.25.1