The "ILIAS Plugin Utils" library is a collection of utility classes and traits designed to simplify the development and testing of ILIAS (Integriertes Lern-, Informations- und Arbeitskooperationssystem) plugins. It provides various helper methods and traits to streamline common tasks when building and testing ILIAS plugins.
Repository Branch | Composer Package Version | ILIAS Compatibility | PHP Compatibility | Status |
---|---|---|---|---|
release/8 | 8.x | release_8 | >= 8.0 | |
release/7 | 7.x | release_7 | >= 7.2 |
To install the "ILIAS Plugin Utils" library, you can use Composer. Run the following command in your plugin's root directory:
composer require thojou/ilias-plugin-utils:^8.0
The library offers several traits and classes that you can use to simplify plugin development and testing in ILIAS. You can include these traits in your plugin classes to leverage their functionality. See the docs directory for detailed usage guideline.
Dependency Injection
- PluginContainer: Helps manage dependencies and services for your plugin.
Info
- PluginInfo: Extracts essential information from your plugin's composer.json file.
Test Bootstrap
- bootstrap.php: A bootstrap file for setting up the test environment.
Test Cases
- AbstractGUITestCase: A base test case class for GUI-related tests.
- AbstractPluginTestCase: A base test case class for plugin-related tests.
Test Traits
- ContainerMockHelperTrait: Provides methods for mocking Services inside the ILIAS DI Container.
- ConfigGUIHelperTrait: Provides methods for testing ILIAS configuration GUI commands.
- CommonHelperTrait: Provides helper methods for common ILIAS services and components.
- PageComponentHelperTrait: Helps with testing ILIAS page component plugins.
- PluginHelperTrait: Aids in testing ILIAS plugins that interact with the Component Repository.