Skip to content

Commit

Permalink
Add url to AdministrableConfig (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
mako321 authored Feb 22, 2024
1 parent 05252a3 commit fbde2d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Providers/SettingsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function register()
AdministrableConfig::registerConfig(ConfigEnum::CONFIG_KEY . '.h5p_ext_communication', ['boolean'], false);
AdministrableConfig::registerConfig(ConfigEnum::CONFIG_KEY . '.h5p_save_content_state', ['boolean'], false);
AdministrableConfig::registerConfig(ConfigEnum::CONFIG_KEY . '.h5p_save_content_frequency', ['numeric'], false);
AdministrableConfig::registerConfig(ConfigEnum::CONFIG_KEY . '.url', ['string'], false);
}
}
}
15 changes: 15 additions & 0 deletions tests/Feature/SettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private function getConfig(): array
$h5p_ext_communication = false;
$h5p_save_content_state = false;
$h5p_save_content_frequency = 3;
$h5p_url = 'h5p-test';

return [
[
Expand Down Expand Up @@ -106,6 +107,10 @@ private function getConfig(): array
[
'key' => "$configKey.h5p_save_content_frequency",
'value' => $h5p_save_content_frequency,
],
[
'key' => "$configKey.url",
'value' => $h5p_url,
]
];
}
Expand Down Expand Up @@ -215,6 +220,16 @@ private function getAssertData(): array
'readonly' => false,
'value' => 3,
],
'url' => [
'full_key' => "$configKey.url",
'key' => 'url',
'rules' => [
'string'
],
'public' => false,
'readonly' => false,
'value' => 'h5p-test',
],
];
}
}

0 comments on commit fbde2d5

Please sign in to comment.