[NFC] dev/core#2053 Extend nextedGroup test to show that it will return child groups...
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 7 Oct 2020 19:58:03 +0000 (06:58 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 7 Oct 2020 19:58:03 +0000 (06:58 +1100)
tests/phpunit/CRM/Contact/BAO/GroupTest.php

index 1b50f79b52e740deb46e5eea2f3c0a0719af5b1f..3fde42376542c1bdfa5efadc735913cef649d10e 100644 (file)
@@ -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 => '&nbsp;&nbsp;Child Group C',
+    ], $nestedGroup);
   }
 
   /**