parent::setUp();
$this->_cId_a = $this->individualCreate();
$this->_cId_a_2 = $this->individualCreate(array(
- 'last_name' => 'c2',
- 'email' => 'c@w.com',
- 'contact_type' => 'Individual'
- ));
+ 'last_name' => 'c2',
+ 'email' => 'c@w.com',
+ 'contact_type' => 'Individual',
+ ));
$this->_cId_b = $this->organizationCreate();
$this->_cId_b2 = $this->organizationCreate(array('organization_name' => ' Org 2'));
$this->_entity = 'relationship';
$rel1 = $this->callAPISuccess('relationship', 'create', $this->_params);
$getParams = array(
- 'filters' => array('is_current' => 1)
+ 'filters' => array('is_current' => 1),
);
$description = "demonstrates is_current filter";
$subfile = 'filterIsCurrent';
$rel2 = $this->callAPISuccess('relationship', 'create', $rel2Params);
}
- /*
+ /**
* Test using various operators
*/
public function testGetTypeOperators() {
array('relationship_type_id' => $relationType4)));
$getParams = array(
- 'relationship_type_id' => array('IN' => array($relationType2, $relationType3))
+ 'relationship_type_id' => array('IN' => array($relationType2, $relationType3)),
);
$description = "demonstrates use of IN filter";
$description = "demonstrates use of NOT IN filter";
$subfile = 'NotInRelationshipType';
$getParams = array(
- 'relationship_type_id' => array('NOT IN' => array($relationType2, $relationType3))
+ 'relationship_type_id' => array('NOT IN' => array($relationType2, $relationType3)),
);
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 2);
$description = "demonstrates use of BETWEEN filter";
$subfile = 'BetweenRelationshipType';
$getParams = array(
- 'relationship_type_id' => array('BETWEEN' => array($relationType2, $relationType4))
+ 'relationship_type_id' => array('BETWEEN' => array($relationType2, $relationType4)),
);
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 3);
$description = "demonstrates use of Not BETWEEN filter";
$subfile = 'NotBetweenRelationshipType';
$getParams = array(
- 'relationship_type_id' => array('NOT BETWEEN' => array($relationType2, $relationType4))
+ 'relationship_type_id' => array('NOT BETWEEN' => array($relationType2, $relationType4)),
);
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 1);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
array_merge($this->_params, array(
'relationship_type_id' => $relType1,
'contact_id_a' => $this->_cId_a,
- 'contact_id_b' => $this->_cId_a_2
+ 'contact_id_b' => $this->_cId_a_2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
array_merge($this->_params, array(
'relationship_type_id' => $relType1,
'contact_id_a' => $this->_cId_a,
- 'contact_id_b' => $this->_cId_a_2
+ 'contact_id_b' => $this->_cId_a_2,
))
);
$this->callAPISuccess($this->_entity, 'create', array('id' => $relationship['id'], 'is_active' => 0));
$this->callAPISuccess($this->_entity, 'create', array('id' => $relationship['id'], 'is_active' => 1));
}
+
}