+++ /dev/null
-<?php
-/**
- * Test Generated example of using loc_block create API
- * *
- */
-function loc_block_create_example(){
-$params = array(
- 'address_id' => 2,
- 'phone_id' => 2,
- 'email_id' => 3,
-);
-
-try{
- $result = civicrm_api3('loc_block', 'create', $params);
-}
-catch (CiviCRM_API3_Exception $e) {
- // handle error here
- $errorMessage = $e->getMessage();
- $errorCode = $e->getErrorCode();
- $errorData = $e->getExtraParams();
- return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
-}
-
-return $result;
-}
-
-/**
- * Function returns array of result expected from previous function
- */
-function loc_block_create_expectedresult(){
-
- $expectedResult = array(
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'id' => 2,
- 'values' => array(
- '2' => array(
- 'id' => '2',
- 'address_id' => '2',
- 'email_id' => '3',
- 'phone_id' => '2',
- 'im_id' => '',
- 'address_2_id' => '',
- 'email_2_id' => '',
- 'phone_2_id' => '',
- 'im_2_id' => '',
- ),
- ),
-);
-
- return $expectedResult;
-}
-
-
-/*
-* This example has been generated from the API test suite. The test that created it is called
-*
-* testCreateLocBlock and can be found in
-* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
-*
-* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
-*
-* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
-*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
-*
-* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
-*
-* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
-*/
+++ /dev/null
-<?php
-/**
- * Test Generated example of using loc_block get API
- * Get entities and location block in 1 api call *
- */
-function loc_block_get_example(){
-$params = array(
- 'id' => 3,
- 'return' => 'all',
-);
-
-try{
- $result = civicrm_api3('loc_block', 'get', $params);
-}
-catch (CiviCRM_API3_Exception $e) {
- // handle error here
- $errorMessage = $e->getMessage();
- $errorCode = $e->getErrorCode();
- $errorData = $e->getExtraParams();
- return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
-}
-
-return $result;
-}
-
-/**
- * Function returns array of result expected from previous function
- */
-function loc_block_get_expectedresult(){
-
- $expectedResult = array(
- 'id' => '3',
- 'address_id' => '3',
- 'email_id' => '4',
- 'phone_id' => '3',
- 'phone_2_id' => '4',
- 'address' => array(
- 'id' => '3',
- 'location_type_id' => '1',
- 'is_primary' => 0,
- 'is_billing' => 0,
- 'street_address' => '987654321',
- 'manual_geo_code' => 0,
- ),
- 'email' => array(
- 'id' => '4',
- 'location_type_id' => '1',
- 'email' => 'test2@loc.block',
- 'is_primary' => 0,
- 'is_billing' => 0,
- 'on_hold' => 0,
- 'is_bulkmail' => 0,
- ),
- 'phone' => array(
- 'id' => '3',
- 'location_type_id' => '1',
- 'is_primary' => 0,
- 'is_billing' => 0,
- 'phone' => '987654321',
- 'phone_numeric' => '987654321',
- ),
- 'phone_2' => array(
- 'id' => '4',
- 'location_type_id' => '1',
- 'is_primary' => 0,
- 'is_billing' => 0,
- 'phone' => '456-7890',
- 'phone_numeric' => '4567890',
- ),
-);
-
- return $expectedResult;
-}
-
-
-/*
-* This example has been generated from the API test suite. The test that created it is called
-*
-* testCreateLocBlockEntities and can be found in
-* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
-*
-* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
-*
-* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
-*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
-*
-* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
-*
-* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
-*/
+++ /dev/null
-<?php
-/**
- * Test Generated example of using mailing_a_b create API
- * *
- */
-function mailing_a_b_create_example(){
-$params = array(
- 'mailing_id_a' => 1,
- 'mailing_id_b' => 2,
- 'mailing_id_c' => 3,
- 'testing_criteria_id' => 1,
- 'winner_criteria_id' => 1,
- 'declare_winning_time' => '+2 days',
- 'group_percentage' => 10,
-);
-
-try{
- $result = civicrm_api3('mailing_a_b', 'create', $params);
-}
-catch (CiviCRM_API3_Exception $e) {
- // handle error here
- $errorMessage = $e->getMessage();
- $errorCode = $e->getErrorCode();
- $errorData = $e->getExtraParams();
- return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
-}
-
-return $result;
-}
-
-/**
- * Function returns array of result expected from previous function
- */
-function mailing_a_b_create_expectedresult(){
-
- $expectedResult = array(
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'id' => 1,
- 'values' => array(
- '1' => array(
- 'id' => '1',
- 'mailing_id_a' => '1',
- 'mailing_id_b' => '2',
- 'mailing_id_c' => '3',
- 'domain_id' => '1',
- 'testing_criteria_id' => '1',
- 'winner_criteria_id' => '1',
- 'specific_url' => '',
- 'declare_winning_time' => '20140728171837',
- 'group_percentage' => '10',
- ),
- ),
-);
-
- return $expectedResult;
-}
-
-
-/*
-* This example has been generated from the API test suite. The test that created it is called
-*
-* testMailingABCreateSuccess and can be found in
-* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingABTest.php
-*
-* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
-*
-* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
-*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
-*
-* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
-*
-* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
-*/
+++ /dev/null
-<?php
-/**
- * Test Generated example of using tag getlist API
- */
-function tag_getlist_example(){
-$params = array(
- 'input' => 'New Tag3',
-);
-
-try{
- $result = civicrm_api3('tag', 'getlist', $params);
-}
-catch (CiviCRM_API3_Exception $e) {
- // handle error here
- $errorMessage = $e->getMessage();
- $errorCode = $e->getErrorCode();
- $errorData = $e->getExtraParams();
- return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
-}
-
-return $result;
-}
-
-/**
- * Function returns array of result expected from previous function
- */
-function tag_getlist_expectedresult(){
-
- $expectedResult = array(
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'id' => 0,
- 'values' => array(
- '0' => array(
- 'id' => '6',
- 'label' => 'New Tag3',
- 'description' => 'This is description for Our New Tag ',
- 'image' => '',
- ),
- ),
- 'more_results' => '',
- 'page_num' => 1,
-);
-
- return $expectedResult;
-}
-
-
-/*
-* This example has been generated from the API test suite. The test that created it is called
-*
-* testTagGetList and can be found in
-* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/TagTest.php
-*
-* You can see the outcome of the API tests at
-* http://tests.dev.civicrm.org/trunk/results-api_v3
-*
-* To Learn about the API read
-* http://book.civicrm.org/developer/current/techniques/api/
-*
-* and review the wiki at
-* http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
-*
-* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
-*
-* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
-*/