3 * File for the CRM11793 issue
4 * Include class definitions
8 * Test APIv3 civicrm_activity_* functions
13 class api_v3_CRM11793Test
extends CiviUnitTestCase
{
16 * Test setup for every test.
18 * Connect to the database, truncate the tables that will be used
19 * and redirect stdin to a temporary file
21 public function setUp() {
24 $this->individualCreate();
25 $this->householdCreate();
26 $this->organizationCreate();
29 public function tearDown() {
34 * Test civicrm_contact_create.
36 * Verify that attempt to create individual contact with only
37 * first and last names succeeds
39 public function testCRM11793Organization() {
40 $this->_testCRM11793ContactType('Organization');
43 public function testCRM11793Household() {
44 $this->_testCRM11793ContactType('Household');
47 public function testCRM11793Individual() {
48 $this->_testCRM11793ContactType('Individual');
54 public function _testCRM11793ContactType($contactType) {
55 $result = $this->callAPISuccess(
59 'contact_type' => $contactType,
63 foreach ($result['values'] as $idx => $contact) {
64 $this->assertEquals($contact['contact_type'], $contactType, "In line " . __LINE__
);