Commit 6c6e6187 authored by totten's avatar totten
Browse files

INFRA-132 - tests/ - phpcbf

parent 08e57c58
......@@ -6,12 +6,12 @@
*
* (PHP 5)
*
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* GNU Affero General Public License version 3
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
*
* This file is part of CiviCRM
*
......@@ -38,7 +38,7 @@ require_once 'CiviTest/CiviTestSuite.php';
/**
* Class containing all test suites
*
* @package CiviCRM
* @package CiviCRM
*/
class AllTests extends CiviTestSuite {
private static $instance = NULL;
......
......@@ -6,12 +6,12 @@
*
* (PHP 5)
*
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* GNU Affero General Public License version 3
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
*
* This file is part of CiviCRM
*
......@@ -38,7 +38,7 @@ require_once 'CiviTest/CiviTestSuite.php';
/**
* Class containing all test suites
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Activity_AllTests extends CiviTestSuite {
private static $instance = NULL;
......
......@@ -31,7 +31,7 @@ require_once 'CiviTest/CiviUnitTestCase.php';
/**
* Test class for CRM_Activity_BAO_ActivityAssignment BAO
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Activity_BAO_ActivityAssignmentTest extends CiviUnitTestCase {
......@@ -49,7 +49,8 @@ class CRM_Activity_BAO_ActivityAssignmentTest extends CiviUnitTestCase {
* This method is called after a test is executed.
*
*/
protected function tearDown() {}
protected function tearDown() {
}
/**
* Pass zero as an id and make sure no Assignees are retrieved
......@@ -66,7 +67,7 @@ class CRM_Activity_BAO_ActivityAssignmentTest extends CiviUnitTestCase {
*/
public function testRetrieveAssigneeIdsByActivityIdNullId() {
$activity = $this->activityCreate();
$activityId = CRM_Activity_BAO_ActivityAssignment::retrieveAssigneeIdsByActivityId(Null);
$activityId = CRM_Activity_BAO_ActivityAssignment::retrieveAssigneeIdsByActivityId(NULL);
$this->assertEquals(count($activityId), 0, '0 assignees retrieved using null');
}
......@@ -106,7 +107,7 @@ class CRM_Activity_BAO_ActivityAssignmentTest extends CiviUnitTestCase {
*/
public function testGetAssigneeNamesNullId() {
$activity = $this->activityCreate();
$assignees = CRM_Activity_BAO_ActivityAssignment::getAssigneeNames(Null);
$assignees = CRM_Activity_BAO_ActivityAssignment::getAssigneeNames(NULL);
$this->assertEquals(count($assignees), 0, '0 assignee names retrieved');
}
......
......@@ -31,7 +31,7 @@ require_once 'CiviTest/CiviUnitTestCase.php';
/**
* Test class for CRM_Activity_BAO_ActivityTarget BAO
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Activity_BAO_ActivityTargetTest extends CiviUnitTestCase {
......@@ -49,7 +49,8 @@ class CRM_Activity_BAO_ActivityTargetTest extends CiviUnitTestCase {
* This method is called after a test is executed.
*
*/
protected function tearDown() {}
protected function tearDown() {
}
public function testRetrieveTargetIdsByActivityIdZeroID() {
$activity = $this->activityCreate();
......
......@@ -6,12 +6,12 @@
*
* (PHP 5)
*
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* GNU Affero General Public License version 3
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
*
* This file is part of CiviCRM
*
......@@ -38,7 +38,7 @@ require_once 'CiviTest/CiviTestSuite.php';
/**
* Class containing all CRM test suites
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_AllTests extends CiviTestSuite {
private static $instance = NULL;
......
......@@ -5,7 +5,7 @@
*
* (PHP 5)
*
* @package CiviCRM
* @package CiviCRM
*
* This file is part of CiviCRM
*
......@@ -30,7 +30,7 @@ require_once 'CiviTest/CiviUnitTestCase.php';
/**
* Test CRM/Member/BAO Membership Log add , delete functions
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
......@@ -184,11 +184,11 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
$result = $this->callAPISuccess('contribution', 'get', array('return' => 'total_amount'));
$this->assertEquals(2, $result['count']);
foreach($result['values'] as $contribution) {
$this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array(
$this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array(
'contribution_id' => $contribution['id'],
'return' => 'line_total',
)), $contribution['total_amount']);
)), $contribution['total_amount']);
}
}
/**
......@@ -200,14 +200,14 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
return array(
'batch_id' => 4,
'primary_profiles' => array(1 => NULL, 2 => NULL, 3 => NULL),
'primary_contact_id' => Array (
'primary_contact_id' => array(
1 => $this->_contactID,
2 => $this->_contactID2,
3 => $this->_contactID3,
),
'field' => array(
1 => array(
'membership_type' => Array (0 => $this->_orgContactID, 1 => $this->_membershipTypeID),
'membership_type' => array(0 => $this->_orgContactID, 1 => $this->_membershipTypeID),
'join_date' => '07/22/2013',
'membership_start_date' => NULL,
'membership_end_date' => NULL,
......@@ -221,7 +221,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
'contribution_status_id' => 1,
),
2 => array(
'membership_type' => Array (0 => $this->_orgContactID, 1 => $this->_membershipTypeID),
'membership_type' => array(0 => $this->_orgContactID, 1 => $this->_membershipTypeID),
'join_date' => '07/03/2013',
'membership_start_date' => '02/03/2013',
'membership_end_date' => NULL,
......@@ -236,7 +236,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
),
// no join date, coded end date
3 => array(
'membership_type' => Array (0 => $this->_orgContactID, 1 => $this->_membershipTypeID),
'membership_type' => array(0 => $this->_orgContactID, 1 => $this->_membershipTypeID),
'join_date' => NULL,
'membership_start_date' => NULL,
'membership_end_date' => '2013-12-01',
......@@ -263,7 +263,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase {
return array(
//'batch_id' => 4,
'primary_profiles' => array(1 => NULL, 2 => NULL, 3 => NULL),
'primary_contact_id' => Array (
'primary_contact_id' => array(
1 => $this->_contactID,
2 => $this->_contactID2,
3 => $this->_contactID3,
......
......@@ -6,10 +6,10 @@
*
* (PHP 5)
*
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* GNU Affero General Public License version 3
* @package CiviCRM
* @package CiviCRM
*
* This file is part of CiviCRM
*
......@@ -37,7 +37,7 @@ require_once 'api/api.php';
/**
* Test contact custom search functions
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Bridge_OG_DrupalTest extends CiviUnitTestCase {
/*
......
......@@ -8,7 +8,7 @@ require_once 'CiviTest/CiviTestSuite.php';
/**
* Class containing all test suites
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Case_AllTests extends CiviTestSuite {
private static $instance = NULL;
......
......@@ -6,12 +6,12 @@
*
* (PHP 5)
*
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* @author Walt Haas <walt@dharmatech.org> (801) 534-1262
* @copyright Copyright CiviCRM LLC (C) 2009
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
* GNU Affero General Public License version 3
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
* @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $
* @package CiviCRM
*
* This file is part of CiviCRM
*
......@@ -38,7 +38,7 @@ require_once 'CiviTest/CiviTestSuite.php';
/**
* Class containing all test suites
*
* @package CiviCRM
* @package CiviCRM
*/
class CRM_Contacts_AllTests extends CiviTestSuite {
private static $instance = NULL;
......
......@@ -16,7 +16,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
* test with empty params.
*/
public function testAddWithEmptyParams() {
$params = array( );
$params = array();
$contact = CRM_Contact_BAO_Contact::add($params);
//Now check Contact object
......@@ -331,7 +331,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
'location_type_id' => 1,
'is_primary' => 1,
);
$compareParams = array('street_address' => CRM_Utils_Array::value('street_address', $params['address'][1]),
$compareParams = array(
'street_address' => CRM_Utils_Array::value('street_address', $params['address'][1]),
'supplemental_address_1' => CRM_Utils_Array::value('supplemental_address_1',
$params['address'][1]
),
......@@ -358,7 +359,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
$this->assertDBCompareValues('CRM_Core_DAO_OpenID', $searchParams, $compareParams);
//Now check DB for IM
$compareParams = array('name' => CRM_Utils_Array::value('name', $params['im'][1]),
$compareParams = array(
'name' => CRM_Utils_Array::value('name', $params['im'][1]),
'provider_id' => CRM_Utils_Array::value('provider_id', $params['im'][1]),
);
$this->assertDBCompareValues('CRM_Core_DAO_IM', $searchParams, $compareParams);
......@@ -491,7 +493,6 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
//delete all notes related to contact
CRM_Core_BAO_Note::cleanContactNotes($contactId);
//cleanup DB by deleting the contact
Contact::delete($contactId);
$this->quickCleanup(array('civicrm_contact', 'civicrm_note'));
......@@ -628,7 +629,6 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
//delete all notes related to contact
CRM_Core_BAO_Note::cleanContactNotes($contactId);
//cleanup DB by deleting the contact
Contact::delete($contactId);
$this->quickCleanup(array('civicrm_contact'));
......@@ -699,7 +699,6 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
'id', 'openid', 'Database check, openId deleted successfully.'
);
// Check that the custom field value is no longer present
$params = array(
'entityID' => $contactId,
......@@ -824,7 +823,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
);
$dbPrefComm = explode(CRM_Core_DAO::VALUE_SEPARATOR,
CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'preferred_communication_method', 'id', true)
CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'preferred_communication_method', 'id', TRUE)
);
$checkPrefComm = array();
foreach ($dbPrefComm as $key => $value) {
......@@ -840,7 +839,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
'location_type_id' => 1,
'is_primary' => 1,
);
$compareParams = array('street_address' => CRM_Utils_Array::value('street_address-Primary', $profileParams),
$compareParams = array(
'street_address' => CRM_Utils_Array::value('street_address-Primary', $profileParams),
'supplemental_address_1' => CRM_Utils_Array::value('supplemental_address_1-Primary', $profileParams),
'supplemental_address_2' => CRM_Utils_Array::value('supplemental_address_2-Primary', $profileParams),
'city' => CRM_Utils_Array::value('city-Primary', $profileParams),
......@@ -857,7 +857,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
$this->assertDBCompareValues('CRM_Core_DAO_Email', $searchParams, $compareParams);
//Now check DB for IM
$compareParams = array('name' => CRM_Utils_Array::value('im-Primary', $profileParams),
$compareParams = array(
'name' => CRM_Utils_Array::value('im-Primary', $profileParams),
'provider_id' => CRM_Utils_Array::value('im-Primary-provider_id', $profileParams),
);
$this->assertDBCompareValues('CRM_Core_DAO_IM', $searchParams, $compareParams);
......@@ -1026,7 +1027,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
);
$dbPrefComm = explode(CRM_Core_DAO::VALUE_SEPARATOR,
CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'preferred_communication_method', 'id', true)
CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'preferred_communication_method', 'id', TRUE)
);
$checkPrefComm = array();
foreach ($dbPrefComm as $key => $value) {
......@@ -1042,7 +1043,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
'location_type_id' => 1,
'is_primary' => 1,
);
$compareParams = array('street_address' => CRM_Utils_Array::value('street_address-Primary', $updatePfParams),
$compareParams = array(
'street_address' => CRM_Utils_Array::value('street_address-Primary', $updatePfParams),
'supplemental_address_1' => CRM_Utils_Array::value('supplemental_address_1-Primary', $updatePfParams),
'supplemental_address_2' => CRM_Utils_Array::value('supplemental_address_2-Primary', $updatePfParams),
'city' => CRM_Utils_Array::value('city-Primary', $updatePfParams),
......@@ -1059,7 +1061,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
$this->assertDBCompareValues('CRM_Core_DAO_Email', $searchParams, $compareParams);
//Now check DB for IM
$compareParams = array('name' => CRM_Utils_Array::value('im-Primary', $updatePfParams),
$compareParams = array(
'name' => CRM_Utils_Array::value('im-Primary', $updatePfParams),
'provider_id' => CRM_Utils_Array::value('im-Primary-provider_id', $updatePfParams),
);
$this->assertDBCompareValues('CRM_Core_DAO_IM', $searchParams, $compareParams);
......@@ -1394,7 +1397,6 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
'email' => 'john.smith@example.org',
);
$params['phone'] = array();
$params['phone'][1] = array(
'location_type_id' => 1,
......@@ -1432,15 +1434,15 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
public function testTimestamps_contact() {
$test = $this;
$this->_testTimestamps(array(
'UPDATE' => function ($contactId) use ($test) {
$params = array(
'UPDATE' => function ($contactId) use ($test) {
$params = array(
'first_name' => 'Testing',
'contact_type' => 'Individual',
'contact_id' => $contactId,
);
$contact = CRM_Contact_BAO_Contact::add($params);
$test->assertInstanceOf('CRM_Contact_DAO_Contact', $contact, 'Check for created object');
},
$contact = CRM_Contact_BAO_Contact::add($params);
$test->assertInstanceOf('CRM_Contact_DAO_Contact', $contact, 'Check for created object');
},
));
}
......@@ -1450,33 +1452,33 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
public function testTimestamps_email() {
$test = $this;
$this->_testTimestamps(array(
'INSERT' => function ($contactId) use ($test) {
$params = array(
'INSERT' => function ($contactId) use ($test) {
$params = array(
'email' => 'ex-1@example.com',
'is_primary' => 1,
'location_type_id' => 1,
'contact_id' => $contactId,
);
CRM_Core_BAO_Email::add($params);
$test->assertDBQuery('ex-1@example.com',
CRM_Core_BAO_Email::add($params);
$test->assertDBQuery('ex-1@example.com',
'SELECT email FROM civicrm_email WHERE contact_id = %1 ORDER BY id DESC LIMIT 1',
array(1 => array($contactId, 'Integer'))
);
},
},
'UPDATE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'UPDATE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'UPDATE civicrm_email SET email = "ex-2@example.com" WHERE contact_id = %1',
array(1 => array($contactId, 'Integer'))
);
},
},
'DELETE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'DELETE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'DELETE FROM civicrm_email WHERE contact_id = %1',
array(1 => array($contactId, 'Integer'))
);
},
},
));
}
......@@ -1486,33 +1488,33 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
public function testTimestamps_phone() {
$test = $this;
$this->_testTimestamps(array(
'INSERT' => function ($contactId) use ($test) {
$params = array(
'INSERT' => function ($contactId) use ($test) {
$params = array(
'phone' => '202-555-1000',
'is_primary' => 1,
'location_type_id' => 1,
'contact_id' => $contactId,
);
CRM_Core_BAO_Phone::add($params);
$test->assertDBQuery('202-555-1000',
CRM_Core_BAO_Phone::add($params);
$test->assertDBQuery('202-555-1000',
'SELECT phone FROM civicrm_phone WHERE contact_id = %1 ORDER BY id DESC LIMIT 1',
array(1 => array($contactId, 'Integer'))
);
},
},
'UPDATE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'UPDATE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'UPDATE civicrm_phone SET phone = "202-555-2000" WHERE contact_id = %1',
array(1 => array($contactId, 'Integer'))
);
},
},
'DELETE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'DELETE' => function ($contactId) use ($test) {
CRM_Core_DAO::executeQuery(
'DELETE FROM civicrm_phone WHERE contact_id = %1',
array(1 => array($contactId, 'Integer'))
);
},
},
));
}
......@@ -1532,24 +1534,24 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
$customField = $customField['values'][$customField['id']];
$test = $this;
$this->_testTimestamps(array(
'INSERT' => function ($contactId) use ($test, $customGroup, $customField) {
$result = civicrm_api3('contact', 'create', array(
'INSERT' => function ($contactId) use ($test, $customGroup, $customField) {
$result = civicrm_api3('contact', 'create', array(
'contact_id' => $contactId,
'custom_' . $customField['id'] => 'test-1',
));
},
'UPDATE' => function ($contactId) use ($test, $customGroup, $customField) {
CRM_Core_DAO::executeQuery(
},
'UPDATE' => function ($contactId) use ($test, $customGroup, $customField) {
CRM_Core_DAO::executeQuery(
"UPDATE {$customGroup->table_name} SET {$customField['column_name']} = 'test-2' WHERE entity_id = %1",
array(1 => array($contactId, 'Integer'))
);
},
'DELETE' => function ($contactId) use ($test, $customGroup, $customField) {
CRM_Core_DAO::executeQuery(
},
'DELETE' => function ($contactId) use ($test, $customGroup, $customField) {
CRM_Core_DAO::executeQuery(
"DELETE FROM {$customGroup->table_name} WHERE entity_id = %1",
array(1 => array($contactId, 'Integer'))
);
},
},
));
Custom::deleteGroup($customGroup);
......
......@@ -42,7 +42,6 @@ class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase {
$result = CRM_Contact_BAO_ContactType::add($params);
$this->sponsor = $params['name'];
$this->indiviParams = array(
'first_name' => 'Anne',
'last_name' => 'Grant',
......@@ -253,25 +252,21 @@ class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase {
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
// for invalid subtype
$params = array('contact_sub_type' => 'Invalid', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
// for invalid contact type as well as subtype
$params = array('contact_type' => 'Invalid' . CRM_Core_DAO::VALUE_SEPARATOR . 'Invalid', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
// for valid type and invalid subtype
$params = array('contact_type' => 'Individual' . CRM_Core_DAO::VALUE_SEPARATOR . 'Invalid', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
// for invalid type and valid subtype
$params = array('contact_type' => 'Invalid' . CRM_Core_DAO::VALUE_SEPARATOR . 'indivi_student', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
......@@ -294,13 +289,11 @@ class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase {
$result = civicrm_api('contact', 'get', $params, $defaults);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
// for type:Household subtype:Sponsor
$params = array('contact_type' => 'Household' . CRM_Core_DAO::VALUE_SEPARATOR . $this->sponsor, 'version' => 3);
$result = civicrm_api('contact', 'get', $params, $defaults);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
// for type:Household subtype:Student
$params = array('contact_type' => 'Household' . CRM_Core_DAO::VALUE_SEPARATOR . $this->student, 'version' => 3);
$result = civicrm_api('contact', 'get', $params, $defaults);
......
......@@ -29,7 +29,6 @@ class CRM_Contact_BAO_ContactType_ContactTest extends CiviUnitTestCase {
$result = CRM_Contact_BAO_ContactType::add($params);
$this->parent = $params['name'];
$params = array(
'label' => 'org_sponsor',
'name' => 'org_sponsor',
......@@ -219,7 +218,6 @@ DELETE FROM civicrm_contact_type
$this->assertEquals(str_replace(CRM_Core_DAO::VALUE_SEPARATOR, '', $updatedContact->contact_sub_type), $this->parent, 'In line ' . __LINE__);
CRM_Contact_BAO_Contact::deleteContact($contact->id);
$params = array(
'organization_name' => 'Compumentor',
'contact_type' => 'Organization',
......@@ -245,7 +243,6 @@ DELETE FROM civicrm_contact_type
$this->assertEquals(str_replace(CRM_Core_DAO::VALUE_SEPARATOR, '', $updatedContact->contact_sub_type), $this->team, 'In line ' . __LINE__);
CRM_Contact_BAO_Contact::deleteContact($contact->id);
$params = array(
'first_name' => 'Anne',
'last_name' => 'Grant',
......
......@@ -32,7 +32,7 @@ require_once 'CiviTest/Contact.php';
/**
* Test class for CRM_Contact_BAO_GroupContact BAO
*
* @package CiviCRM