Línea 52... |
Línea 52... |
52 |
* @param int $required The required param being tested.
|
52 |
* @param int $required The required param being tested.
|
53 |
* @param bool $debuggingexpected Whether debugging is expected.
|
53 |
* @param bool $debuggingexpected Whether debugging is expected.
|
54 |
* @param mixed $requiredstr The string value of the $required param in the debugging message.
|
54 |
* @param mixed $requiredstr The string value of the $required param in the debugging message.
|
55 |
* @return void
|
55 |
* @return void
|
56 |
*/
|
56 |
*/
|
57 |
public function test_required_param_validation($required, $debuggingexpected, $requiredstr = '') {
|
57 |
public function test_required_param_validation($required, $debuggingexpected, $requiredstr = ''): void {
|
58 |
$externalvalue = new external_value(PARAM_INT, 'Cool description', $required);
|
58 |
$externalvalue = new external_value(PARAM_INT, 'Cool description', $required);
|
59 |
if ($debuggingexpected) {
|
59 |
if ($debuggingexpected) {
|
60 |
$this->assertDebuggingCalled("Invalid \$required parameter value: '{$requiredstr}' .
|
60 |
$this->assertDebuggingCalled("Invalid \$required parameter value: '{$requiredstr}' .
|
61 |
It must be either VALUE_DEFAULT, VALUE_REQUIRED, or VALUE_OPTIONAL", DEBUG_DEVELOPER);
|
61 |
It must be either VALUE_DEFAULT, VALUE_REQUIRED, or VALUE_OPTIONAL", DEBUG_DEVELOPER);
|
62 |
}
|
62 |
}
|