Skip to content
Snippets Groups Projects
Commit db409212 authored by lobo's avatar lobo
Browse files

Merge pull request #2424 from eileenmcnaughton/test-fixes

test suite - fix signature on GroupCreate call
parents 8d4a6b2f fadb804f
No related branches found
No related tags found
No related merge requests found
......@@ -1462,9 +1462,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
* @return int groupId of created group
*
*/
function groupCreate($params = NULL) {
if ($params === NULL) {
$params = array(
function groupCreate($params = array()) {
$params = array_merge(array(
'name' => 'Test Group 1',
'domain_id' => 1,
'title' => 'New Test Group Created',
......@@ -1475,8 +1474,7 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
'1' => 1,
'2' => 1,
),
);
}
), $params);
$result = $this->callAPISuccess('Group', 'create', $params);
return $result['id'];
......
......@@ -596,7 +596,7 @@ class api_v3_ContactTest extends CiviUnitTestCase {
}
function testGetGroupIDFromContact() {
$groupId = $this->groupCreate(NULL);
$groupId = $this->groupCreate();
$description = "Get all from group and display contacts";
$subfile = "GroupFilterUsingContactAPI";
$params = array(
......
......@@ -70,7 +70,7 @@ class api_v3_GroupContactTest extends CiviUnitTestCase {
'visibility' => 'User and User Admin Only',
);
$this->_groupId2 = $this->groupCreate($group, 3);
$this->_groupId2 = $this->groupCreate();
$params = array(
'contact_id.1' => $this->_contactId,
'group_id' => $this->_groupId2,
......
......@@ -53,7 +53,7 @@ class api_v3_GroupOrganizationTest extends CiviUnitTestCase {
protected function setUp() {
$this->_apiversion = 3;
parent::setUp();
$this->_groupID = $this->groupCreate(NULL);
$this->_groupID = $this->groupCreate();
$this->_orgID = $this->organizationCreate(NULL);
}
......
......@@ -49,7 +49,7 @@ class api_v3_GroupTest extends CiviUnitTestCase {
$this->_apiversion = 3;
parent::setUp();
$this->_groupID = $this->groupCreate(NULL, 3);
$this->_groupID = $this->groupCreate();
}
function tearDown() {
......
......@@ -49,7 +49,7 @@ class api_v3_MailingGroupTest extends CiviUnitTestCase {
function setUp() {
parent::setUp();
$this->_apiversion = 3;
$this->_groupID = $this->groupCreate(NULL);
$this->_groupID = $this->groupCreate();
$this->_email = 'test@test.test';
}
......
......@@ -49,7 +49,7 @@ class api_v3_MailingTest extends CiviUnitTestCase {
function setUp() {
parent::setUp();
$this->_groupID = $this->groupCreate(NULL);
$this->_groupID = $this->groupCreate();
$this->_email = 'test@test.test';
$this->_params = array(
'subject' => 'maild',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment