dev/core#1048 test replicating bug
authoreileen <emcnaughton@wikimedia.org>
Sun, 23 Jun 2019 02:50:31 +0000 (14:50 +1200)
committereileen <emcnaughton@wikimedia.org>
Sun, 23 Jun 2019 20:12:45 +0000 (08:12 +1200)
tests/phpunit/CRM/Contact/SelectorTest.php

index 4ea885657d8ff26251beafb49736360a32c6cf60..f19e125342ecd64dc6e678ab806c95a2f40aa40b 100644 (file)
@@ -49,6 +49,7 @@ class CRM_Contact_SelectorTest extends CiviUnitTestCase {
    *   clause will need changing.
    *
    * @dataProvider querySets
+   * @throws \Exception
    */
   public function testSelectorQuery($dataSet) {
     $params = CRM_Contact_BAO_Query::convertFormValues($dataSet['form_values'], 0, FALSE, NULL, array());
@@ -176,6 +177,20 @@ class CRM_Contact_SelectorTest extends CiviUnitTestCase {
    */
   public function querySets() {
     return array(
+      array(
+        array(
+          'description' => 'Empty group test',
+          'class' => 'CRM_Contact_Selector',
+          'settings' => [],
+          'form_values' => [['contact_type', '=', 'Individual', 1, 0], ['group', 'IS NULL', '', 1, 0]],
+          'params' => [],
+          'return_properties' => NULL,
+          'context' => 'builder',
+          'action' => CRM_Core_Action::NONE,
+          'includeContactIds' => NULL,
+          'searchDescendentGroups' => FALSE,
+        ),
+      ),
       array(
         array(
           'description' => 'Normal default behaviour',