<?php
-
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2014 |
+| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
require_once 'CiviTest/CiviUnitTestCase.php';
public function setUp() {
parent::setUp();
- $this->_cId_a = $this->individualCreate();
- $this->_cId_b = $this->organizationCreate();
+ $this->_cId_a = $this->individualCreate();
+ $this->_cId_b = $this->organizationCreate();
}
public function tearDown() {
///////////////// civicrm_relationship_type_add methods
/**
- * Check with no name
+ * Check with no name.
*/
public function testRelationshipTypeCreateWithoutName() {
$relTypeParams = array(
}
/**
- * Check with no contact type
+ * Check with no contact type.
*/
public function testRelationshipTypeCreateWithoutContactType() {
$relTypeParams = array(
}
/**
- * Create relationship type
+ * Create relationship type.
*/
public function testRelationshipTypeCreate() {
$params = array(
}
/**
- * Test using example code
+ * Test using example code.
*/
public function testRelationshipTypeCreateExample() {
require_once 'api/v3/examples/RelationshipType/Create.php';
}
/**
- * Check if required fields are not passed
+ * Check if required fields are not passed.
*/
public function testRelationshipTypeDeleteWithoutRequired() {
$params = array(
}
/**
- * Check with incorrect required fields
+ * Check with incorrect required fields.
*/
public function testRelationshipTypeDeleteWithIncorrectData() {
$params = array(
}
/**
- * Check relationship type delete
+ * Check relationship type delete.
*/
public function testRelationshipTypeDelete() {
$id = $this->_relationshipTypeCreate();
// create sample relationship type.
$params = array(
- 'id' => $id,
+ 'id' => $id,
);
$result = $this->callAPIAndDocument('relationship_type', 'delete', $params, __FUNCTION__, __FILE__);
$this->assertAPIDeleted('relationship_type', $id);
///////////////// civicrm_relationship_type_update
/**
- * Check with empty array
+ * Check with empty array.
*/
public function testRelationshipTypeUpdateEmpty() {
$params = array();
}
/**
- * Check with no contact type
+ * Check with no contact type.
*/
public function testRelationshipTypeUpdateWithoutContactType() {
// create sample relationship type.
}
/**
- * Check with all parameters
+ * Check with all parameters.
*/
public function testRelationshipTypeUpdate() {
// create sample relationship type.
///////////////// civicrm_relationship_types_get methods
/**
- * Check with empty array
+ * Check with empty array.
*/
public function testRelationshipTypesGetEmptyParams() {
$firstRelTypeParams = array(
/**
* Create relationship type.
+ * @param null $params
+ * @return mixed
*/
public function _relationshipTypeCreate($params = NULL) {
if (!is_array($params) || empty($params)) {
return $this->relationshipTypeCreate($params);
}
+
}