Skip to content

Commit

Permalink
fix test errors in core_external\external_api_test
Browse files Browse the repository at this point in the history
test_all_external_info complains about `Invalid $required parameter
value: ''` and VALUE_DEFAULT seems the appropriate substitute.

refs openequella#99
  • Loading branch information
usqfowlerj committed Oct 1, 2024
1 parent 1402e29 commit d125946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static function find_usage_for_item_returns() {
'visible' => new external_value(PARAM_BOOL, 'Whether the content is visible. False if either the content itself or the course is not visible.'),
'attributes' => new external_multiple_structure(new external_single_structure(array(

'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', false))))));
'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', VALUE_DEFAULT))))));
}
public static function find_all_usage_returns() {
return new external_single_structure(array(
Expand Down Expand Up @@ -162,7 +162,7 @@ public static function find_all_usage_returns() {
'visible' => new external_value(PARAM_BOOL, 'Whether the content is visible. False if either the content itself or the course is not visible.'),
'attributes' => new external_multiple_structure(new external_single_structure(array(

'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', false))))));
'key' => new external_value(PARAM_RAW, 'Attribute key'),'value' => new external_value(PARAM_RAW, 'Attribute value'))), '', VALUE_DEFAULT))))));
}
public static function unfiltered_usage_count_returns() {
return new external_single_structure(array(
Expand Down

0 comments on commit d125946

Please sign in to comment.