-
Bug
-
Resolution: Fixed
-
Minor
-
4.4
-
MOODLE_404_STABLE
-
MOODLE_404_STABLE
-
MDL-81603-404 -
- Covered by automated tests (PHPUnit)
See this test: https://github.com/paulholden/moodle/blob/ebcc967d2e3a20229629e2712ab2cc521bbbd9ed/reportbuilder/tests/datasource_test.php#L272-L273
The problem we have is that the test asserts specific number of report elements that the user entity contains (column, filters, conditions) - so once MDL-81602 is implemented (or right now in the case of Workplace: WP-4771) these tests are fragile because they cannot take account of/be aware of any additional elements added to the user entity
Re-factor the test to not rely on other entities, and to only perform assertions on entities that are under control of the test
Backport to stable branches as per usual improvements to test infra