ContactTestTrait
trait ContactTestTrait
Class ContactTestTrait
Methods
Emulate a logged in user since certain functions use that.
Generic function to create Organisation, to be used in test cases
Generic function to create Individual, to be used in test cases
Generic function to create Household, to be used in test cases
Helper function for getting sample contact properties.
Delete contact, ensuring it is not the domain contact
Add a Group.
Delete a Group.
Function to add a Group.
Details
at line 26
int
createLoggedInUser()
Emulate a logged in user since certain functions use that.
value to store a record in the DB (like activity) CRM-8180
at line 56
int
organizationCreate(array $params = [], int $seq = 0)
Generic function to create Organisation, to be used in test cases
at line 78
int
individualCreate(array $params = [], int $seq = 0, bool $random = FALSE)
Generic function to create Individual, to be used in test cases
at line 96
int
householdCreate(array $params = [], int $seq = 0)
Generic function to create Household, to be used in test cases
at line 113
array
sampleContact(string $contact_type, int $seq = 0, bool $random = FALSE)
Helper function for getting sample contact properties.
at line 176
contactDelete(int $contactID)
Delete contact, ensuring it is not the domain contact
at line 195
int
groupCreate(array $params = [])
Add a Group.
at line 218
groupDelete(int $gid)
Delete a Group.
at line 238
int
groupContactCreate(int $groupID, int $totalCount = 10, bool $random = FALSE)
Function to add a Group.