mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-42666 tests: Setting new Box.net mandatory arguments
This commit is contained in:
parent
81b07e655c
commit
7cb353ff69
@ -177,7 +177,7 @@ class testing_repository_generator extends component_generator_base {
|
||||
$record = $this->prepare_type_record($record);
|
||||
foreach ($typeoptions as $option) {
|
||||
if (!isset($record[$option])) {
|
||||
throw new coding_exception("$option must be present in testing::create_repository_type() $record");
|
||||
throw new coding_exception("$option must be present in testing::create_repository_type() for $type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,11 @@ class repository_boxnet_generator extends testing_repository_generator {
|
||||
*/
|
||||
protected function prepare_type_record(array $record) {
|
||||
$record = parent::prepare_type_record($record);
|
||||
if (!isset($record['api_key'])) {
|
||||
$record['api_key'] = 'api_key';
|
||||
if (!isset($record['clientid'])) {
|
||||
$record['clientid'] = 'clientid';
|
||||
}
|
||||
if (!isset($record['clientsecret'])) {
|
||||
$record['clientsecret'] = 'clientsecret';
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user