From: eileenmcnaughton Date: Mon, 2 Feb 2015 05:08:01 +0000 (+0000) Subject: remove examples that are not generated by existing tests X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=84671739a2299a8536bd3a1481d635a6e1c4d986;p=civicrm-core.git remove examples that are not generated by existing tests --- diff --git a/api/v3/examples/LocBlock/Create.php b/api/v3/examples/LocBlock/Create.php deleted file mode 100644 index c9ecc85242..0000000000 --- a/api/v3/examples/LocBlock/Create.php +++ /dev/null @@ -1,76 +0,0 @@ - 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 -*/ diff --git a/api/v3/examples/LocBlock/Get.php b/api/v3/examples/LocBlock/Get.php deleted file mode 100644 index 50e3a7ff0a..0000000000 --- a/api/v3/examples/LocBlock/Get.php +++ /dev/null @@ -1,96 +0,0 @@ - 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 -*/ diff --git a/api/v3/examples/MailingAB/Create.php b/api/v3/examples/MailingAB/Create.php deleted file mode 100644 index dea3cb4e34..0000000000 --- a/api/v3/examples/MailingAB/Create.php +++ /dev/null @@ -1,81 +0,0 @@ - 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 -*/ diff --git a/api/v3/examples/TagGetList.php b/api/v3/examples/TagGetList.php deleted file mode 100644 index 6655cfa341..0000000000 --- a/api/v3/examples/TagGetList.php +++ /dev/null @@ -1,70 +0,0 @@ - '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 -*/