Merge pull request #11086 from agileware/CRM-21277
[civicrm-core.git] / tests / phpunit / api / v3 / MailingABTest.php
old mode 100755 (executable)
new mode 100644 (file)
index 17a8116..823b0d5
  *   <http://www.gnu.org/licenses/>.
  */
 
-require_once 'CiviTest/CiviUnitTestCase.php';
-
-
 /**
  *  Test APIv3 civicrm_mailingab_* functions
  *
  * @package   CiviCRM
+ * @group headless
  */
 class api_v3_MailingABTest extends CiviUnitTestCase {
   protected $_mailingID_A;
@@ -123,9 +121,7 @@ class api_v3_MailingABTest extends CiviUnitTestCase {
    * @dataProvider groupPctProvider
    */
   public function testDistribution($totalGroupContacts, $groupPct, $expectedCountA, $expectedCountB, $expectedCountC) {
-    $this->createLoggedInUser();
-
-    $result = $this->groupContactCreate($this->_groupID, $totalGroupContacts);
+    $result = $this->groupContactCreate($this->_groupID, $totalGroupContacts, TRUE);
     $this->assertEquals($totalGroupContacts, $result['added'], "in line " . __LINE__);
 
     $params = $this->_params;