X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FParticipantStatusType%2FCreate.php;h=9059a8b3225bcc6fb9c6298beaeb74d669ec5f8b;hb=635c56f990633b7f33baf821bcde9157ff495ec5;hp=b4793cfe9f524570fa7d6f1095b3ab13d1b9afec;hpb=50fb255df80198566298b0c79919ef44878cb3be;p=civicrm-core.git diff --git a/api/v3/examples/ParticipantStatusType/Create.php b/api/v3/examples/ParticipantStatusType/Create.php index b4793cfe9f..9059a8b322 100644 --- a/api/v3/examples/ParticipantStatusType/Create.php +++ b/api/v3/examples/ParticipantStatusType/Create.php @@ -1,13 +1,6 @@ getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -54,13 +48,13 @@ function participant_status_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 16, + 'id' => 18, 'values' => array( - '16' => array( - 'id' => '16', + '18' => array( + 'id' => '18', 'name' => 'test status', 'label' => 'I am a test', - 'class' => '14', + 'class' => 'Positive', 'is_reserved' => 0, 'is_active' => '1', 'is_counted' => '1', @@ -73,11 +67,10 @@ function participant_status_type_create_expectedresult() { return $expectedResult; } -/** +/* * This example has been generated from the API test suite. -* The test that created it is called -* testCreateParticipantStatusType -* and can be found in +* The test that created it is called "testGetParticipantStatusType" +* and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php * * You can see the outcome of the API tests at @@ -87,7 +80,7 @@ function participant_status_type_create_expectedresult() { * 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 +* http://MYSITE.ORG/path/to/civicrm/api * * Read more about testing here * http://wiki.civicrm.org/confluence/display/CRM/Testing