-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5.3
-
MOODLE_405_STABLE
-
MDL-84483-main
-
- Ensure PHPUnit passes
-
-
MDL-75850 added logic to skip firing the after_file_created hook in unit tests.
This causes problems for unit tests that test functionality triggered by the after_file_created hook.
This is not an ideal approach to take. Hooks should fire in unit tests. If a unit test requires specific functionality (or to avoid specific functionality) from a hook, it can be intercepted by mocking a hook listener: https://moodledev.io/docs/5.0/apis/core/hooks#dispatching-hooks
It seems like at one point there was an `after_file_created` listener (initially introduced in MDL-75850), but MDL-83245 since removed that listener, and there are no others in core. So it should be safe to revert this code back to how it used to be (i.e., always fire the hook).
- has a non-specific relationship to
-
MDL-84977 PHP unit Integration tests for create_file with file_storage are not possible
-
- Open
-
-
MDL-83245 Addresses design issues with File redaction
-
- Closed
-
- is a regression caused by
-
MDL-75850 Add the ability to configure automatic EXIF data removal from uploaded images
-
- Closed
-