Update Test generated examples
[civicrm-core.git] / api / v3 / examples / Setting / Revert.php
index 2dedceea2fa963f5262ea7d6c75417b3a061bd3d..40631b92af01345de5646a3b8ac27cea27ca7404 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Test Generated example of using setting revert API.
+ * Test Generated example demonstrating the Setting.revert API.
  *
  * Demonstrates reverting a parameter to default value.
  *
@@ -13,7 +13,7 @@ function setting_revert_example() {
   );
 
   try{
-    $result = civicrm_api3('setting', 'revert', $params);
+    $result = civicrm_api3('Setting', 'revert', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -21,7 +21,8 @@ function setting_revert_example() {
     $errorCode = $e->getErrorCode();
     $errorData = $e->getExtraParams();
     return array(
-      'error' => $errorMessage,
+      'is_error' => 1,
+      'error_message' => $errorMessage,
       'error_code' => $errorCode,
       'error_data' => $errorData,
     );
@@ -64,11 +65,10 @@ function setting_revert_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testRevert
-* and can be found in
+* The test that created it is called "testRevert"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
 *
 * You can see the outcome of the API tests at