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() {
33 * Test civicrm_contact_create.
35 * Verify that attempt to create individual contact with only
36 * first and last names succeeds
38 public function testCRM11793Organization() {
39 $this->_testCRM11793ContactType('Organization');
42 public function testCRM11793Household() {
43 $this->_testCRM11793ContactType('Household');
46 public function testCRM11793Individual() {
47 $this->_testCRM11793ContactType('Individual');
53 public function _testCRM11793ContactType($contactType) {
54 $result = $this->callAPISuccess(
58 'contact_type' => $contactType,
62 foreach ($result['values'] as $idx => $contact) {
63 $this->assertEquals($contact['contact_type'], $contactType, "In line " . __LINE__
);